\SimpleModelAdmin
This is a modified / simplified version of the default SilverStripe 3.0* ModelAdmin
Synopsis
class SimpleModelAdmin
extends LeftAndMain
{
- // members
- public static string $url_rule = '/$ModelClass/$Action';
- public static $managed_models = NULL;
- public static array $allowed_actions = ;
- public static array $url_handlers = ;
- protected String $modelClass;
- public static integer $page_length = 30;
- public static true $enable_sorting = false;
- // methods
- public void init()
- public void Link()
- public void getEditForm()
- protected SS_List getManagedModelTabs()
- protected string sanitiseClassName()
- protected string unsanitiseClassName()
- public array getManagedModels()
- public ArrayList Breadcrumbs()
- public static void set_page_length()
- public static void get_page_length()
Hierarchy
Extends
- LeftAndMain
Members
protected
- $modelClass — String
public
- $allowed_actions
- $enable_sorting
—
true
Disable column sorting by default - $managed_models
- $page_length
—
int
Amount of results showing on a single page. - $url_handlers
- $url_rule
Methods
protected
- getManagedModelTabs() — Returns managed models' create, search, and import forms
- sanitiseClassName() — Sanitise a model class' name for inclusion in a link
- unsanitiseClassName() — Unsanitise a model class' name from a URL param
public
- Breadcrumbs()
- Link()
- getEditForm()
- getManagedModels()
- get_page_length() — Return the static page_length of the admin, default as 30
- init() — Initialize the model admin interface. Sets up embedded jquery libraries and requisite plugins.
- set_page_length() — overwrite the static page_length of the admin panel, should be called in the project _config file.