\Content\Model\EntityContentType

Represents a single "content_type" within "content_types" table.

Summary

Methods
Properties
Constants
userAllowed()
checkPermission()
$id
$slug
$name
$description
$title_label
$defaults
No constants found
_loadPermissions()
$_permissions
N/A
No private methods found
No private properties found
N/A

Properties

$id

$id : integer

Type

integer

$slug

$slug : string

Type

string

$name

$name : string

Type

string

$description

$description : string

Type

string

$title_label

$title_label : string

Type

string

$defaults

$defaults : array

Type

array

$_permissions

$_permissions : \Cake\Collection\Collection

Permissions list.

Type

\Cake\Collection\Collection

Methods

userAllowed()

userAllowed(string $action) : boolean

Checks if current user is allowed to perform the given $action (create, edit, delete, publish).

Parameters

string $action

The action to check: create, edit, delete or publish

Returns

boolean

checkPermission()

checkPermission(integer $roleId, string $action) : boolean

Checks if the provided $roleId is allowed to perform the given $action.

Parameters

integer $roleId

Role ID

string $action

Action to check: create, edit, delete or publish

Returns

boolean

_loadPermissions()

_loadPermissions() : void

Loads ll permissions rules for this content type.