You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
666B

  1. <?php
  2. namespace Lc\CaracoleBundle\Solver\Section;
  3. use Lc\CaracoleBundle\Model\Section\SectionInterface;
  4. use Lc\CaracoleBundle\Model\Section\SectionModel;
  5. class SectionSolver
  6. {
  7. public function isSectionCommon(SectionInterface $section)
  8. {
  9. return $section->getDevAlias() == SectionModel::DEVALIAS_COMMON;
  10. }
  11. // @TODO : à voir si pertinent
  12. public function getNewsletter(SectionInterface $section)
  13. {
  14. $newsletters = $section->getNewsletters();
  15. foreach ($newsletters as $newsletter) {
  16. if ($newsletter->getIsMain()) {
  17. return $newsletter;
  18. }
  19. }
  20. return false;
  21. }
  22. }