vendor/score/cms/src/Services/PageManager.php line 21

Open in your IDE?
  1. <?php
  2. namespace Score\CmsBundle\Services;
  3. use Score\BaseBundle\Services\BaseManager as BaseManager;
  4. use Score\CmsBundle\Entity\Menu;
  5. class PageManager extends BaseManager {
  6.     public function getPagesByParent($parent)
  7.     {
  8.         return $this->getRepository()->findBy(array('parentPage' => $parent));
  9.     }
  10.     public function getPageById($id)
  11.     {
  12.         return $this->getRepository()->find($id);
  13.     }
  14.     public function getPageBySeoId($seo_id)
  15.     {
  16.         return $this->getRepository()->findOneBy(array('seoId' => $seo_id));
  17.     }
  18. //    public function getMainMenu()
  19. //    {
  20. //         $repository = $this->getDbProvider()->getRepository(Menu::class);
  21. //
  22. //
  23. //        return $repository->findBy(
  24. //                        array('parentId' => 1),
  25. //                        array('sortOrder' => 'ASC')
  26. //        );
  27. //    }
  28. //    public function getBlockjoints($page)
  29. //    {
  30. //        $blocks =  $this->getRepository()->findBlockJoints($page);
  31. //
  32. //        $groups = array('news' => array());
  33. //        foreach($blocks as $block)
  34. //        {
  35. //            $groups[$block->getType()][] = $block;
  36. //        }
  37. //
  38. //
  39. //        return $groups;
  40. //
  41. //    }
  42. }