Source of file GridFieldConfig_BlogPost.php
Size: 1,024 Bytes - Last Modified: 2021-12-23T10:04:17+00:00
/var/www/docs.ssmods.com/process/src/code/forms/gridfield/GridFieldConfig_BlogPost.php
12345678910111213141516171819202122232425262728 | <?php /** * GridField config necessary for managing a SiteTree object. * * @package silverstripe * @subpackage blog * * @author Michael Strong <github@michaelstrong.co.uk> **/ class GridFieldConfig_BlogPost extends GridFieldConfig { public function __construct($itemsPerPage = null) { parent::__construct($itemsPerPage); $this->addComponent(new GridFieldButtonRow('before')); $this->addComponent(new GridFieldSiteTreeAddNewButton('buttons-before-left')); $this->addComponent(new GridFieldToolbarHeader()); $this->addComponent(new GridFieldSortableHeader()); $this->addComponent(new GridFieldFilterHeader()); $this->addComponent(new GridFieldDataColumns()); $this->addComponent(new GridFieldSiteTreeEditButton()); $this->addComponent(new GridFieldPageCount('toolbar-header-right')); $this->addComponent($pagination = new GridFieldPaginator($itemsPerPage)); $this->addComponent(new GridFieldBlogPostState()); $pagination->setThrowExceptionOnBadDataType(true); } } |