PHP Класс Craft\Neo_BlockModel

Наследование: extends craft\BaseElementModel
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$modified boolean Used to indicate whether this block needs to be saved to the database.

Защищенные свойства (Protected)

Свойство Тип Описание
$elementType Protected properties

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

Метод Описание
getAncestors ( integer | null $dist = null ) : craft\ElementCriteriaModel Returns the block's ancestors.
getChildren ( null $field = null ) : craft\ElementCriteriaModel Returns the block's children.
getDescendants ( integer | null $dist = null ) : craft\ElementCriteriaModel Returns the block's descendants.
getField ( ) : craft\FieldModel | null Returns the field the block is associated with.
getFieldLayout ( ) : craft\FieldLayoutModel | null Returns the field layout the block is associated with.
getLocales ( ) : array Returns the locale ID's the block is available in.
getNextSibling ( ) : Neo_BlockModel | null Returns the block's next sibling.
getOwner ( ) : craft\BaseElementModel | null Returns the element that this block belongs as a field value to.
getParent ( ) : Neo_BlockModel | null Returns the block's parent.
getPrevSibling ( ) : Neo_BlockModel | null Returns the block's previous sibling.
getSiblings ( ) : craft\ElementCriteriaModel Returns the block's siblings.
getType ( ) : Neo_BlockTypeModel | null Returns the block's type.
setAllElements ( array $elements ) Allows memoizing all blocks (including this one) for a particular field.
setOwner ( craft\BaseElementModel $owner ) Allow the owner to be manually memoized, so that getOwner doesn't have to perform a DB query to find the owner.

Защищенные методы

Метод Описание
defineAttributes ( ) Protected methods

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

defineAttributes() защищенный Метод

Protected methods
protected defineAttributes ( )

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

Returns the block's ancestors.
public getAncestors ( integer | null $dist = null ) : craft\ElementCriteriaModel
$dist integer | null
Результат craft\ElementCriteriaModel

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

Returns the block's children.
public getChildren ( null $field = null ) : craft\ElementCriteriaModel
$field null - This is a deprecated parameter
Результат craft\ElementCriteriaModel

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

Returns the block's descendants.
public getDescendants ( integer | null $dist = null ) : craft\ElementCriteriaModel
$dist integer | null
Результат craft\ElementCriteriaModel

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

Returns the field the block is associated with.
public getField ( ) : craft\FieldModel | null
Результат craft\FieldModel | null

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

Returns the field layout the block is associated with.
public getFieldLayout ( ) : craft\FieldLayoutModel | null
Результат craft\FieldLayoutModel | null

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

Returns the locale ID's the block is available in.
public getLocales ( ) : array
Результат array

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

Returns the block's next sibling.
public getNextSibling ( ) : Neo_BlockModel | null
Результат Neo_BlockModel | null

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

Returns the element that this block belongs as a field value to.
public getOwner ( ) : craft\BaseElementModel | null
Результат craft\BaseElementModel | null

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

Returns the block's parent.
public getParent ( ) : Neo_BlockModel | null
Результат Neo_BlockModel | null

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

Returns the block's previous sibling.
public getPrevSibling ( ) : Neo_BlockModel | null
Результат Neo_BlockModel | null

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

Returns the block's siblings.
public getSiblings ( ) : craft\ElementCriteriaModel
Результат craft\ElementCriteriaModel

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

Returns the block's type.
public getType ( ) : Neo_BlockTypeModel | null
Результат Neo_BlockTypeModel | null

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

This is used for Live Preview mode, where certain methods, like getAncestors, create element criteria models which need a local set of blocks to query against.
public setAllElements ( array $elements )
$elements array

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

This is useful for Live Preview mode, where blocks might belong to a new owner, which won't have an ID yet.
public setOwner ( craft\BaseElementModel $owner )
$owner craft\BaseElementModel

Описание свойств

$elementType защищенное свойство

Protected properties
protected $elementType

$modified публичное свойство

Used to indicate whether this block needs to be saved to the database.
public bool $modified
Результат boolean