Properties

$ContentTypes

$ContentTypes : \Content\Model\Table\ContentTypesTable

Type

\Content\Model\Table\ContentTypesTable

$TranslationOf

$TranslationOf : \Content\Model\Table\ContentsTable

Type

\Content\Model\Table\ContentsTable

$Roles

$Roles : \User\Model\Table\RolesTable

Type

\User\Model\Table\RolesTable

$ContentRevisions

$ContentRevisions : \User\Model\Table\ContentRevisionsTable

Type

\User\Model\Table\ContentRevisionsTable

$Translations

$Translations : \User\Model\Table\ContentsTable

Type

\User\Model\Table\ContentsTable

$Author

$Author : \User\Model\Table\UsersTable

Type

\User\Model\Table\UsersTable

Methods

implementedEvents()

implementedEvents() : array

List of implemented events.

Returns

array

initialize()

initialize(array $config) : void

Initialize a table instance. Called after the constructor.

Parameters

array $config

Configuration options passed to the constructor

validationDefault()

validationDefault(\Cake\Validation\Validator $validator) : \Cake\Validation\Validator

Default validation rules set.

Parameters

\Cake\Validation\Validator $validator

The validator object

Returns

\Cake\Validation\Validator

beforeSave()

beforeSave(\Cake\Event\Event $event, \Content\Model\Entity\Content $entity, \ArrayObject $options) : boolean

This callback performs two action, saving revisions and checking publishing constraints.

  • Saves a revision version of each content being saved if it has changed.

  • Verifies the publishing status and forces to be "false" if use has no publishing permissions for this content type.

Parameters

\Cake\Event\Event $event

The event that was triggered

\Content\Model\Entity\Content $entity

The entity being saved

\ArrayObject $options

Array of options

Returns

boolean —

True on success

operatorPromote()

operatorPromote(\Cake\ORM\Query $query, \Search\Token $token) : \Cake\ORM\Query

Handles "promote" search operator.

promote:<true|false>

Parameters

\Cake\ORM\Query $query

The query object

\Search\Token $token

Operator token

Returns

\Cake\ORM\Query

operatorAuthor()

operatorAuthor(\Cake\ORM\Query $query, \Search\Token $token) : \Cake\ORM\Query

Handles "author" search operator.

author:,, ...

Parameters

\Cake\ORM\Query $query

The query object

\Search\Token $token

Operator token

Returns

\Cake\ORM\Query

addSearchOperator()

addSearchOperator(string $name, mixed $handler, array $options) : void

Parameters

string $name
mixed $handler
array $options

enableSearchOperator()

enableSearchOperator(string $name) : void

Parameters

string $name

disableSearchOperator()

disableSearchOperator(string $name) : void

Parameters

string $name

bindComments()

bindComments() : void

unbindComments()

unbindComments() : void

configureFieldable()

configureFieldable(array $config) : void

Parameters

array $config

bindFieldable()

bindFieldable() : void

unbindFieldable()

unbindFieldable() : void

attachFields()

attachFields(\Cake\Datasource\EntityInterface $entity) : \Cake\Datasource\EntityInterface

Parameters

\Cake\Datasource\EntityInterface $entity

Returns

\Cake\Datasource\EntityInterface

findComments()

findComments(\Cake\ORM\Query $query, mixed $options) : \Cake\Datasource\ResultSetDecorator

Parameters

\Cake\ORM\Query $query
mixed $options

Returns

\Cake\Datasource\ResultSetDecorator

search()

search(string $criteria, \Cake\ORM\Query|null $query) : \Cake\ORM\Query

Parameters

string $criteria
\Cake\ORM\Query|null $query

Returns

\Cake\ORM\Query

_saveRevision()

_saveRevision(\Cake\ORM\Entity $entity) : void

Tries to create a revision for the given content.

Parameters

\Cake\ORM\Entity $entity

The content

_ensureStatus()

_ensureStatus(\Cake\ORM\Entity $entity) : void

Ensures that content content has the correct publishing status based in content type restrictions.

If it's a new content it will set the correct status. However if it's an existing content and user has no publishing permissions this method will not change content's status, so it will remain published if it was already published by an administrator.

Parameters

\Cake\ORM\Entity $entity

The content

_calculateHash()

_calculateHash(\Cake\Datasource\EntityInterface $entity) : string

Generates a unique hash for the given entity.

Used by revision system to detect if an entity has changed or not.

Parameters

\Cake\Datasource\EntityInterface $entity

The entity for which calculate its hash

Returns

string —

MD5 hash for this particular entity