SilverStripe\SiteConfig\SiteConfig
SiteConfig
Synopsis
class SiteConfig
extends DataObject
implements
PermissionProvider,TemplateGlobalProvider
{
- // members
- private static array $db = ;
- private static array $many_many = ;
- private static array $defaults = ;
- private static string $table_name = 'SiteConfig';
- private static array $required_permission = ;
- // methods
- public void populateDefaults()
- public FieldList getCMSFields()
- public FieldList getCMSActions()
- public string CMSEditLink()
- public static SiteConfig current_site_config()
- public void requireDefaultRecords()
- public static SiteConfig make_site_config()
- public boolean canView()
- public boolean canViewPages()
- public boolean canEditPages()
- public void canEdit()
- public array providePermissions()
- public boolean canCreateTopLevel()
- public static void get_template_global_variables()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Implements
- SilverStripe\Security\PermissionProvider
- SilverStripe\View\TemplateGlobalProvider
Members
private
- $db
- $defaults
- $many_many
- $required_permission
—
array
Default permission to check for 'LoggedInUsers' to create or edit pages - $table_name
Methods
public
- CMSEditLink()
- canCreateTopLevel() — Can a user create pages in the root of this site?
- canEdit()
- canEditPages() — Can a user edit pages on this site? This method is only called if a page is set to Inherit, but there is nothing to inherit from, or on new records without a parent.
- canView() — Can a user view this SiteConfig instance?
- canViewPages() — Can a user view pages on this site? This method is only called if a page is set to Inherit, but there is nothing to inherit from.
- current_site_config() — Get the current sites SiteConfig, and creates a new one through {@link make_site_config()} if none is found.
- getCMSActions() — Get the actions that are sent to the CMS.
- getCMSFields() — Get the fields that are sent to the CMS.
- get_template_global_variables() — Add $SiteConfig to all SSViewers
- make_site_config() — Create SiteConfig with defaults from language file.
- populateDefaults()
- providePermissions()
- requireDefaultRecords() — Setup a default SiteConfig record if none exists.