Source of file BlogSortableCategories.php
Size: 0,461 Bytes - Last Modified: 2021-12-23T10:56:27+00:00
/var/www/docs.ssmods.com/process/src/code/BlogSortableCategories.php
12345678910111213141516171819 | <?php /** * Updates the GridField to add the orderable rows component * * @author Aaron Carlino <aaron@silverstripe.com> * @package unclecheese/blog-sortable-categories */ class BlogSortableCategories extends DataExtension { /** * @param FieldList $fields */ public function updateCMSFields (FieldList $fields) { if($grid = $fields->dataFieldByName('Categories')) { $grid->getConfig()->addComponent(new GridFieldOrderableRows()); } } } |