Newscoop\Entity\OutputSettings::setSectionPage PHP Метод

setSectionPage() публичный Метод

Set the section page template resource.
public setSectionPage ( Resource $sectionPage = null ) : Newscoop\Entity\OutputSetting
$sectionPage Resource The section page template resource, must not be null or empty.
Результат Newscoop\Entity\OutputSetting This object for chaining purposes.
    function setSectionPage(Resource $sectionPage = null)
    {
        $this->sectionPage = $sectionPage;
        return $this;
    }

Usage Example

 /**
  * Copies from the from output settings to the to output settings all the pages (front, article ...).
  * @param Newscoop\Entity\OutputSettings $to
  * 		The output setting to copy to, *(not null not empty).
  * @param Newscoop\Entity\OutputSettings $from
  * 		The output setting to copy from, *(not null not empty).
  */
 protected function syncOutputSettings(OutputSettings $to, OutputSettings $from)
 {
     $syncRsc = $this->getSyncResourceService();
     $to->setFrontPage($syncRsc->getSynchronized($from->getFrontPage()));
     $to->setSectionPage($syncRsc->getSynchronized($from->getSectionPage()));
     $to->setArticlePage($syncRsc->getSynchronized($from->getArticlePage()));
     $to->setErrorPage($syncRsc->getSynchronized($from->getErrorPage()));
 }