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)); }
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); }
public function filterByFolder(Folder $folder) { $this->filterByParentID($folder->getPage()->getCollectionID()); }