예제 #1
0
 public function copyToTargetCategory(StackCategory $category)
 {
     $list = new StackList();
     $list->filterByStackCategory($this);
     $stacks = $list->get();
     foreach ($stacks as $stack) {
         $stack->duplicate($category->getPage());
     }
 }
예제 #2
0
파일: stacks.php 프로젝트: a3020/concrete5
 protected function setupMultilingualStackList(\Concrete\Core\Page\Stack\StackList $list)
 {
     if (\Core::make('multilingual/detector')->isEnabled()) {
         $category = StackCategory::getCategoryFromMultilingualSection($this->getSelectedLanguage());
         if (!is_object($category)) {
             // we have to create the category
             $category = StackCategory::createFromMultilingualSection($this->getSelectedLanguage());
             // now we copy all the stacks into it
             $default = StackCategory::getFromDefaultMultilingualSection();
             $default->copyToTargetCategory($category);
         }
         $list->filterByStackCategory($category);
     }
 }
예제 #3
0
 public function filterByStackCategory(Concrete\Core\Page\Stack\StackCategory $category)
 {
     return parent::filterByStackCategory($category);
 }