SilverStripe CSP headers

CSPDomain extends DataObject
in package
implements PermissionProvider

Class \Firesphere\CSPHeaders\Models\CSPDomain

Table of Contents

Interfaces

PermissionProvider

Properties

$Domain  : string
$Source  : string
$belongs_many_many  : mixed
$db  : mixed
$indexes  : mixed
$plural_name  : mixed
$searchable_fields  : mixed
$singular_name  : mixed
$sourceMap  : array<string|int, mixed>
$summary_fields  : mixed
$table_name  : mixed

Methods

canCreate()  : bool|int
canDelete()  : bool|int
canEdit()  : bool|int
canView()  : bool|int
getCMSFields()  : FieldList
getTitle()  : string
Pages()  : ManyManyList|array<string|int, Page>
providePermissions()  : mixed
Return a map of permission codes to add to the dropdown shown in the Security section of the CMS.
setSourceMap()  : void
getSourceMap()  : array<string|int, mixed>|array<string|int, string>

Properties

$belongs_many_many

private static mixed $belongs_many_many = ['Pages' => \Page::class]

$db

private static mixed $db = ['Domain' => \SilverStripe\ORM\FieldType\DBVarchar::class, 'Source' => \SilverStripe\ORM\FieldType\DBEnum::class . '("default,script,style,img,media,font,form,frame,ancestor,worker,connect")']

$indexes

private static mixed $indexes = ['Domain' => true]

$plural_name

private static mixed $plural_name = 'Content Security Policy Domains'

$searchable_fields

private static mixed $searchable_fields = ['Domain', 'Source']

$singular_name

private static mixed $singular_name = 'Content Security Policy Domain'

$sourceMap

private static array<string|int, mixed> $sourceMap = ['default' => 'All', 'script' => 'Javascripts', 'style' => 'Styling', 'img' => 'Images', 'media' => 'Embedded media (e.g. YouTube)', 'font' => 'Fonts', 'form' => 'Forms', 'frame' => 'Iframes', 'worker' => 'Worker', 'connect' => 'Connect']
Tags
todo

make translatable

$summary_fields

private static mixed $summary_fields = ['Domain', 'Source']

$table_name

private static mixed $table_name = 'CSPDomain'

Methods

canCreate()

public canCreate([null|Member $member = null ][, array<string|int, mixed> $context = array() ]) : bool|int
Parameters
$member : null|Member = null
$context : array<string|int, mixed> = array()
Return values
bool|int

canDelete()

public canDelete([null|Member $member = null ]) : bool|int
Parameters
$member : null|Member = null
Return values
bool|int

canEdit()

public canEdit([null|Member $member = null ]) : bool|int
Parameters
$member : null|Member = null
Return values
bool|int

canView()

public canView([null|Member $member = null ]) : bool|int
Parameters
$member : null|Member = null
Return values
bool|int

getCMSFields()

public getCMSFields() : FieldList
Return values
FieldList

getTitle()

public getTitle() : string
Return values
string

Pages()

public Pages() : ManyManyList|array<string|int, Page>
Return values
ManyManyList|array<string|int, Page>

providePermissions()

Return a map of permission codes to add to the dropdown shown in the Security section of the CMS.

public providePermissions() : mixed

array( 'VIEW_SITE' => 'View the site', );

setSourceMap()

public static setSourceMap(array<string|int, mixed>|array<string|int, string> $sourceMap) : void
Parameters
$sourceMap : array<string|int, mixed>|array<string|int, string>

getSourceMap()

protected static getSourceMap() : array<string|int, mixed>|array<string|int, string>
Return values
array<string|int, mixed>|array<string|int, string>

        
On this page

Search results