コード例 #1
0
 public function add($name, Folder $folder = null)
 {
     $site = \Core::make('site')->getActiveSiteForEditing();
     $type = Type::getByHandle(STACK_CATEGORY_PAGE_TYPE);
     $parent = $folder ? $folder->getPage() : \Page::getByPath(STACKS_PAGE_PATH, 'RECENT', $site);
     $data = array();
     $data['name'] = $name;
     $page = $parent->add($type, $data);
     return $this->application->make('Concrete\\Core\\Page\\Stack\\Folder\\Folder', array($page));
 }
コード例 #2
0
ファイル: Stack.php プロジェクト: ppiedaderawnet/concrete5
 public static function addStack($stack, Folder $folder = null)
 {
     $parent = \Page::getByPath(STACKS_PAGE_PATH);
     if ($folder) {
         $parent = $folder->getPage();
     }
     return self::addStackToCategory($parent, $stack, static::ST_TYPE_USER_ADDED);
 }
コード例 #3
0
 public function filterByFolder(Folder $folder)
 {
     $this->filterByParentID($folder->getPage()->getCollectionID());
 }