Source of file ShopFrontPageController.php
Size: 0,731 Bytes - Last Modified: 2021-12-23T10:25:10+00:00
/var/www/docs.ssmods.com/process/src/src/Controller/ShopFrontPageController.php
1234567891011121314151617181920212223242526 | <?php namespace SilverShop\ShopFront\Controller; use PageController; use SilverShop\ShopFront\Model\ShopFrontSection; use SilverStripe\ORM\DataList; class ShopFrontPageController extends PageController { /** * Returns only the list of ShopFrontSection objects that are suitable for display (aren't hidden), optionally * overloaded by other extensions to return a differently filtered list of objects. * * @return DataList<ShopFrontSection>|null */ public function SectionsForDisplay(): ?DataList { $sections = $this->data()->Sections()->filter('HideFromDisplay', 0)->sort('Sort ASC'); $this->extend('updateSectionsForDisplay', $sections); return $sections; } } |