Source of file AdvertReport.php
Size: 1,595 Bytes - Last Modified: 2021-12-23T10:58:29+00:00
/var/www/docs.ssmods.com/process/src/code/AdvertReport.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 | <?php class AdvertReport extends SS_Report { /* * SS_Report->getCMSFields() uses $description the property directly! */ protected $description = 'Check on how many impressions and click throughs adverts have had'; // the report title public function title() { return 'Advert Report'; } /** * Return an array of columns to display in your report. */ public function columns() { return array( 'Title' => 'Title', 'StartDate' => 'Start Date', 'FinishDate' => 'Finish Time', 'AdvertSource' => 'Advert Source', 'Clickthroughs' => 'Click Throughs', 'Impressions' => 'Impressions', ); } public function sourceRecords($params = null) { return DataList::create('Advert');//->limit(10); } public function parameterFieldsTODO() { $params = new FieldList(); //Colour filter /* $colours = singleton('Page')->dbObject('Colour')->enumValues(); $params->push(new DropdownField( "Colour", "Colour", $colours )); */ //Result Limit $filterOptions = array( 1 => 'Available', 2 => 'Training', 3 => 'All Ice Slots', ); $df = new DropdownField( 'IceSlotFilter', 'Limit results to', $filterOptions, 50 ); // $df->setSize(100); $params->push($df); return $params; } } |