-
-
Save hailwood/92f78ae37d932c16b57d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MyModelAdmin extends ModelAdmin { | |
//.. | |
public function getEditForm($id = null, $fields = null) { | |
$form = parent::getEditForm($id, $fields); | |
$gridFieldName = $this->sanitiseClassName($this->modelClass); | |
/** @var GridField $gridField */ | |
$gridField = $form->Fields()->fieldByName($gridFieldName); | |
$gridField->getConfig() | |
->addComponent(new GridFieldFilterHeader()) | |
->addComponent(new GridFieldSortableRows('SortOrder')); | |
//here I want to do some extra actions after the GridFieldSortableRows has applied | |
//it's modifications to the gridfield! | |
return $form; | |
} | |
//.. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment