Source of file GridFieldConfig_CatalogueRelated.php
Size: 1,087 Bytes - Last Modified: 2021-12-24T05:16:22+00:00
/var/www/docs.ssmods.com/process/src/code/forms/gridfield/GridFieldConfig_CatalogueRelated.php
12345678910111213141516171819202122232425262728293031 | <?php /** * Allows editing of records contained within the GridField, instead of only allowing the ability to view records in * the GridField. * * @package forms * @subpackage fields-gridfield */ class GridFieldConfig_CatalogueRelated extends GridFieldConfig_Catalogue { /** * * @param array $classname Name of class who's subclasses will be added to form * @param int $itemsPerPage - How many items per page should show up * @param boolean | string $sorting Allow sorting of rows, either false or the name of the sort column */ public function __construct($classname, $itemsPerPage=null, $sort_col = false) { parent::__construct($classname, $itemsPerPage, $sort_col); // Remove uneeded components $this->removeComponentsByType('GridFieldDeleteAction'); $this->removeComponentsByType('GridFieldExportButton'); $this->addComponent(new GridFieldAddExistingAutocompleter('buttons-before-right')); $this->addComponent(new GridFieldDeleteAction(true)); if ($sort_col != false) { $this->addComponent(new GridFieldOrderableRows($sort_col)); } } } |