Skip to content

Instantly share code, notes, and snippets.

@kinglozzer
Created September 18, 2015 15:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kinglozzer/2ffced6ae7aef8a53652 to your computer and use it in GitHub Desktop.
Save kinglozzer/2ffced6ae7aef8a53652 to your computer and use it in GitHub Desktop.
<?php
class SomeModelAdmin extends ModelAdmin {
private static $managed_models = array(
"MyDataObject"
);
public function getEditForm($id = null, $fields = null) {
$form = parent::getEditForm($id, $fields);
$gridField = $form->Fields()->dataFieldByName('MyDataObject');
$gridField->getConfig()->addComponent(GridFieldOrderableRows::create('SortColumn'));
return $form;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment