Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Page extends SiteTree {
- public static $db = array(
- );
- public static $has_one = array(
- );
- function getCMSFields() {
- $fields = parent::getCMSFields();
- $config = GridFieldConfig::create()->addComponents(
- new GridFieldToolbarHeader(),
- new GridFieldAddNewButton('toolbar-header-right'),
- new GridFieldSortableHeader(),
- new GridFieldDataColumns(),
- new GridFieldPaginator(10),
- new GridFieldEditButton(),
- new GridFieldDeleteAction(),
- new GridFieldDetailForm()
- );
- $gf = new GridField("ViewerGroups", "ViewerGroups", $this->ViewerGroups(), $config);
- $fields->addFieldToTab("Root.ViewerGroups", $gr);
- return $fields;
- }
- }
Add Comment
Please, Sign In to add comment