Source of file EcommerceSideReportLongTitles.php
Size: 0,866 Bytes - Last Modified: 2021-12-23T10:39:35+00:00
/var/www/docs.ssmods.com/process/src/src/Reports/EcommerceSideReportLongTitles.php
1234567891011121314151617181920212223242526272829303132333435363738394041424344 | <?php namespace Sunnysideup\Ecommerce\Reports; use SilverStripe\Reports\Report; use Sunnysideup\Ecommerce\Pages\Product; /** * Selects all products. * * @authors: Nicolaas [at] Sunny Side Up .co.nz * @package: ecommerce * @sub-package: reports */ class EcommerceSideReportLongTitles extends Report { use EcommerceProductReportTrait; protected $dataClass = Product::class; private static $min_length = 100; /** * @return string */ public function title() { return _t('EcommerceSideReport.ALLPRODUCTS', 'E-commerce: Long Titles'); } /** * @return int - for sorting reports */ public function sort() { return 7000; } protected function getEcommerceWhere($params = null): string { return 'CHAR_LENGTH("Title") > ' . $this->Config()->get('min_length'); } } |