Source of file HeavyProducts.php
Size: 0,844 Bytes - Last Modified: 2021-12-23T10:24:58+00:00
/var/www/docs.ssmods.com/process/src/src/Reports/SideReport/HeavyProducts.php
12345678910111213141516171819202122232425262728293031323334353637383940414243 | <?php namespace SilverShop\Reports\SideReport; use SilverShop\Page\Product; use SilverStripe\Reports\Report; class HeavyProducts extends Report { public function title() { return _t('SilverShop\Reports\SideReport.Heavy', 'Heavy Products'); } public function group() { return _t('SilverShop\Reports\SideReport.ShopGroup', 'Shop'); } public function sort() { return 0; } public function sourceRecords($params = null) { return Product::get()->filter('Weight:GreaterThan', 10)->sort('Weight', 'ASC'); } public function columns() { return [ 'Title' => [ 'title' => 'Title', 'link' => true, ], 'Weight' => [ 'title' => 'Weight', ], ]; } } |