Source of file MapMarkerSetsExtension.php
Size: 0,917 Bytes - Last Modified: 2021-12-23T10:58:57+00:00
/var/www/docs.ssmods.com/process/src/code/MapMarkerSetsExtension.php
12345678910111213141516171819202122232425262728293031323334 | <?php class MapMarkerSetsExtension extends DataExtension { public static $many_many = array( 'MapMarkerSets' => 'MapMarkerSet', ); public static $belongs_many_many_extraFields = array( 'MapMarkerSets' => array( 'SortOrder' => 'Int', ), ); public function updateCMSFields(FieldList $fields) { $gridConfig2 = GridFieldConfig_RelationEditor::create(); $gridConfig2->getComponentByType( 'GridFieldAddExistingAutocompleter' )->setSearchFields( array('Title') ); $gridConfig2->getComponentByType('GridFieldPaginator')->setItemsPerPage(100); $gridField2 = new GridField( 'MapMarkerSets', 'MapMarker Sets', $this->owner->MapMarkerSets(), $gridConfig2 ); $fields->addFieldToTab('Root.MapMarkerSets', $gridField2); } } |