コード例 #1
0
ファイル: feeds.php プロジェクト: ppiedaderawnet/concrete5
 protected function loadFeedFromRequest(\Concrete\Core\Entity\Page\Feed $pf = null)
 {
     if (!$pf) {
         $pf = new \Concrete\Core\Entity\Page\Feed();
     }
     $pf->setTitle($this->post('pfTitle'));
     $pf->setDescription($this->post('pfDescription'));
     $pf->setHandle($this->post('pfHandle'));
     $pf->setPageTypeID($this->post('ptID'));
     $pf->setCustomTopicAttributeKeyHandle($this->post('customTopicAttributeKeyHandle'));
     $customTopicTreeNodeID = $this->post('customTopicAttributeKeyHandle') ? $this->post('customTopicTreeNodeID') : 0;
     $pf->setCustomTopicTreeNodeID($customTopicTreeNodeID);
     $pf->setParentID(intval($this->post('cParentID')));
     $pf->setIncludeAllDescendents($this->post('pfIncludeAllDescendents'));
     $pf->setDisplayAliases($this->post('pfDisplayAliases'));
     $pf->setIconFileID($this->post('iconFID'));
     $pf->setDisplayFeaturedOnly($this->post('pfDisplayFeaturedOnly'));
     if ($this->post('pfContentToDisplay') == 'A') {
         $pf->displayAreaContent($this->post('pfAreaHandleToDisplay'));
     } else {
         $pf->displayShortDescriptionContent();
     }
     return $pf;
 }