예제 #1
0
 /**
  * @inheritdoc
  */
 protected function requestCanBeHandled(EntityInterface $entity)
 {
     $blogRoute = Plugin::getConfig('blogRootBlockName');
     if ($entity instanceof Page && preg_match("/^({$blogRoute})(\\/|\$)/", $entity->getRoute())) {
         return parent::requestCanBeHandled($entity);
     } else {
         return false;
     }
 }
예제 #2
0
파일: Renderer.php 프로젝트: rogyar/Balcon
 /**
  * Collects list of posts for current page
  *
  * @param Page $post
  */
 public function collectListOfPosts(Page $post)
 {
     $pagesCollection = $post->getBlocksCollection();
     $blogPostsCollection = $pagesCollection->getBlock(Plugin::getConfig('blogRootBlockName'))->getChildren();
     $this->listOfPosts = $this->sortPosts($blogPostsCollection);
 }