LittleGiant\SinglePageAdmin\SinglePageAdmin
Defines the Single Page Administration interface for the CMS
- Author: Stevie Mayhew
Synopsis
class SinglePageAdmin
extends LeftAndMain
implements
PermissionProvider
{
- // members
- private static string $url_segment = 'little-giant/single-page-admin';
- private static string $menu_title = 'Single Page Admin';
- private static string $url_rule = '/$Action/$ID/$OtherID';
- private static string $menu_icon_class = 'font-icon-edit-list';
- private static array $allowed_actions = ;
- private static bool $ignore_tree_class_subclasses = false;
- private static $required_permission_codes;
- protected SiteTree $page = NULL;
- // methods
- public void init()
- protected SiteTree findOrMakePage()
- public bool|int canView()
- public array providePermissions()
- public Form getEditForm()
- public Form|SinglePageAdmin EditForm()
- public mixed currentPageID()
- public bool getSilverStripeNavigator()
- public mixed getResponseNegotiator()
- public mixed LinkPreview()
- protected FieldList getCMSActions()
- public mixed save()
- public mixed publish()
- public mixed|HTTPResponse doSave()
- public mixed unPublish()
- public HTTPResponse rollback()
- public mixed edit()
- public string Backlink()
Hierarchy
Extends
- SilverStripe\Admin\LeftAndMain
Implements
- SilverStripe\Security\PermissionProvider
Tasks
Line | Task |
---|---|
555 | Redirect to the base url of the form - 24/11/17 Ryan Potter |
Members
private
- $allowed_actions — array
- $ignore_tree_class_subclasses
—
LittleGiant\SinglePageAdmin\bool
It may be desirable to have subclasses of the "single page", but pick up the declared tree_class in the single page admin as the page instance to be edited. This is probably the desired behaviour by default, but is defaulted to false to prevent a breaking change to existing code. - $required_permission_codes
—
array
Codes which are required from the current user to view this controller. - $url_rule — string
-
$url_segment
As of 4.0 all subclasses of LeftAndMain have to have a $url_segment as a result of this, we need to hide the item from the cms menu
protected
- $page
—
SilverStripe\CMS\Model\SiteTree
A cached reference to the page record
Methods
protected
- findOrMakePage() — Helper function for getting the single page instance, existing or created
- getCMSActions()
public
- Backlink()
- EditForm()
- LinkPreview()
- canView()
- currentPageID()
- doSave()
- edit()
- getEditForm()
- getResponseNegotiator()
- init() — Initialize requirements for this view
- providePermissions()
- publish()
- rollback()
- save()
- unPublish()