Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

34 rindas
790B

  1. <?php
  2. namespace Lc\CaracoleBundle\Solver\Merchant;
  3. use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
  4. class MerchantSolver
  5. {
  6. public function getNewsletters(MerchantInterface $merchant): array
  7. {
  8. $newsletterArray = [];
  9. foreach($merchant->getSections() as $section) {
  10. foreach($section->getNewsletters() as $newsletter) {
  11. $newsletterArray[] = $newsletter;
  12. }
  13. }
  14. return $newsletterArray;
  15. }
  16. public function getSectionsOnline(MerchantInterface $merchant):array{
  17. $sectionArray = [];
  18. foreach($merchant->getSections() as $section) {
  19. if($section->getStatus() == 1){
  20. $sectionArray[] = $section;
  21. }
  22. }
  23. return $sectionArray;
  24. }
  25. }