public function publish($pageName, $languageName)
    {
        $this->contributorDefined();

        $baseDir = $this->pagesDir . '/' . $pageName;
        $pageCollectionSourceFile = $baseDir . '/' . $this->username . '.json';
        $pageCollectionTargetFile = $baseDir . '/page.json';
        $pageDir = $baseDir . '/' . $languageName;
        $pageSourceFile = $pageDir . '/' . $this->username . '.json';
        $pageTargetFile = $pageDir . '/seo.json';

        Dispatcher::dispatch(PageEvents::PAGE_PUBLISHING, new PagePublishingEvent());
        copy($pageCollectionSourceFile, $pageCollectionTargetFile);
        copy($pageSourceFile, $pageTargetFile);

        Dispatcher::dispatch(PageEvents::PAGE_PUBLISHED, new PagePublishedEvent());
        DataLogger::log(sprintf('Page "%s" for language "%s" was published in production', $pageName, $languageName));
    }
public function publish($pageName, $languageName)
    {
        $this->contributorDefined();

        $baseDir = $this->pagesDir . '/' . $pageName;
        $pageCollectionSourceFile = $baseDir . '/' . $this->username . '.json';
        $pageCollectionTargetFile = $baseDir . '/page.json';
        $pageDir = $baseDir . '/' . $languageName;
        $pageSourceFile = $pageDir . '/' . $this->username . '.json';
        $pageTargetFile = $pageDir . '/seo.json';

        Dispatcher::dispatch(PageEvents::PAGE_PUBLISHING, new PagePublishingEvent());
        copy($pageCollectionSourceFile, $pageCollectionTargetFile);
        copy($pageSourceFile, $pageTargetFile);

        Dispatcher::dispatch(PageEvents::PAGE_PUBLISHED, new PagePublishedEvent());
        DataLogger::log(sprintf('Page "%s" for language "%s" was published in production', $pageName, $languageName));
    }
public function publish ( $ pageName , $ languageName ) { $ this -> contributorDefined ( ) ; $ baseDir = $ this -> pagesDir . '/' . $ pageName ; $ pageCollectionSourceFile = $ baseDir . '/' . $ this -> username . '.json' ; $ pageCollectionTargetFile = $ baseDir . '/page.json' ; $ pageDir = $ baseDir . '/' . $ languageName ; $ pageSourceFile = $ pageDir . '/' . $ this -> username . '.json' ; $ pageTargetFile = $ pageDir . '/seo.json' ; Dispatcher :: dispatch ( PageEvents :: PAGE_PUBLISHING , new PagePublishingEvent ( ) ) ; copy ( $ pageCollectionSourceFile , $ pageCollectionTargetFile ) ; copy ( $ pageSourceFile , $ pageTargetFile ) ; Dispatcher :: dispatch ( PageEvents :: PAGE_PUBLISHED , new PagePublishedEvent ( ) ) ; DataLogger :: log ( sprintf ( 'Page "%s" for language "%s" was published in production' , $ pageName , $ languageName ) ) ; }
Publish the current seo
@param $pageName
@param $languageName
Publish the current seo