SilverStripe\CMS\Model\SiteTree::canCreate
This function should return true if the current user can create new pages of this class, regardless of class. It can be overloaded to customise the security model for an application.
By default, permission to create at the root level is based on the SiteConfig configuration, and permission to create beneath a parent is based on the ability to edit that parent page. Use to control behaviour of creating children under this page.
Signature
public function canCreate([Member
$member = NULL,
[array
$context = ]] )
Parameters
$member
— object
$context
— array- Optional array which may contain ['Parent' => $parentObj]
If a parent page is known, it will be checked for validity.
If omitted, it will be assumed this is to be created as a top level page.
Returns
- bool
- True if the current user can create pages on this class.