PHP Трейт Bolt\Storage\Entity\ContentRelationTrait

This is a breakout of the old Bolt\Content class and serves two main purposes: * Maintain backward compatibility for Bolt\Content through the remainder of the 2.x development/release life-cycle * Attempt to break up former functionality into sections of code that more resembles Single Responsibility Principles These traits should be considered transitional, the functionality in the process of refactor, and not representative of a valid approach.
Автор: Gawain Lynch ([email protected])
Показать файл Открыть проект

Открытые методы

Метод Описание
clearRelation ( string | array $contenttype ) : void Clears a relation.
getRelation ( string $filterContentType = null, array $options = [] ) : Content[] Gets one or more related records.
related ( $filterContentType = null, $options = [] ) Alias for getRelation()
setRelation ( string | array $contenttype, integer $id ) : void Add a relation.

Описание методов

clearRelation() публичный Метод

Clears a relation.
public clearRelation ( string | array $contenttype ) : void
$contenttype string | array
Результат void

getRelation() публичный Метод

Gets one or more related records.
public getRelation ( string $filterContentType = null, array $options = [] ) : Content[]
$filterContentType string ContentType to filter returned results on
$options array A set of 'WHERE' options to apply to the filter Backward compatability note: The $options parameter used to be $filterid, an integer.
Результат Bolt\Legacy\Content[]

setRelation() публичный Метод

Add a relation.
public setRelation ( string | array $contenttype, integer $id ) : void
$contenttype string | array
$id integer
Результат void