NSWDPC\Utilities\ContentSecurityPolicy\Directive
A Content Security Policy directive, can be used by multiple {@link Policy}
- Author: james.ellis@dpc.nsw.gov.au
Synopsis
class Directive
extends DataObject
implements
PermissionProvider
{
- // members
- private static string $table_name = 'CspDirective';
- private static string $singular_name = 'Directive';
- private static string $plural_name = 'Directives';
- private static string $default_sort = 'Key ASC';
- private static array $db = ;
- private static array $summary_fields = ;
- private static array $belongs_many_many = ;
- // methods
- public void getTitle()
- public void possibleKeys()
- public static void KeysWithoutValues()
- public void onBeforeWrite()
- public FieldList getCMSFields()
- public void getValuesFromRules()
- public void getDirectiveValue()
- public void canView()
- public void canEdit()
- public void canDelete()
- public void canCreate()
- public void providePermissions()
Hierarchy
Extends
- Silverstripe\ORM\DataObject
Implements
- SilverStripe\Security\PermissionProvider
Members
private
- $belongs_many_many
—
array
Many_many relationship - $db
—
array
Database fields - $default_sort
—
string
Default sort ordering - $plural_name
- $singular_name
- $summary_fields
—
array
Defines summary fields commonly used in table columns as a quick overview of the data for this dataobject - $table_name
Methods
public
- KeysWithoutValues()
- canCreate()
- canDelete()
- canEdit()
- canView()
- getCMSFields() — CMS Fields
- getDirectiveValue() — Returns the directive value for use in a header
- getTitle()
- getValuesFromRules() — Rules are stored in a key/value mapping. Return the rules as a value for inclusion in the header
- onBeforeWrite() — Event handler called before writing to the database.
- possibleKeys() — The text here is taken from: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
- providePermissions()