PHP Class Craft\Neo_BlockModel

Inheritance: extends craft\BaseElementModel
Datei anzeigen Open project: benjamminf/craft-neo

Public Properties

Property Type Description
$modified boolean Used to indicate whether this block needs to be saved to the database.

Protected Properties

Property Type Description
$elementType Protected properties

Public Methods

Method Description
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.

Protected Methods

Method Description
defineAttributes ( ) Protected methods

Method Details

defineAttributes() protected method

Protected methods
protected defineAttributes ( )

getAncestors() public method

Returns the block's ancestors.
public getAncestors ( integer | null $dist = null ) : craft\ElementCriteriaModel
$dist integer | null
return craft\ElementCriteriaModel

getChildren() public method

Returns the block's children.
public getChildren ( null $field = null ) : craft\ElementCriteriaModel
$field null - This is a deprecated parameter
return craft\ElementCriteriaModel

getDescendants() public method

Returns the block's descendants.
public getDescendants ( integer | null $dist = null ) : craft\ElementCriteriaModel
$dist integer | null
return craft\ElementCriteriaModel

getField() public method

Returns the field the block is associated with.
public getField ( ) : craft\FieldModel | null
return craft\FieldModel | null

getFieldLayout() public method

Returns the field layout the block is associated with.
public getFieldLayout ( ) : craft\FieldLayoutModel | null
return craft\FieldLayoutModel | null

getLocales() public method

Returns the locale ID's the block is available in.
public getLocales ( ) : array
return array

getNextSibling() public method

Returns the block's next sibling.
public getNextSibling ( ) : Neo_BlockModel | null
return Neo_BlockModel | null

getOwner() public method

Returns the element that this block belongs as a field value to.
public getOwner ( ) : craft\BaseElementModel | null
return craft\BaseElementModel | null

getParent() public method

Returns the block's parent.
public getParent ( ) : Neo_BlockModel | null
return Neo_BlockModel | null

getPrevSibling() public method

Returns the block's previous sibling.
public getPrevSibling ( ) : Neo_BlockModel | null
return Neo_BlockModel | null

getSiblings() public method

Returns the block's siblings.
public getSiblings ( ) : craft\ElementCriteriaModel
return craft\ElementCriteriaModel

getType() public method

Returns the block's type.
public getType ( ) : Neo_BlockTypeModel | null
return Neo_BlockTypeModel | null

setAllElements() public method

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() public method

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

Property Details

$elementType protected_oe property

Protected properties
protected $elementType

$modified public_oe property

Used to indicate whether this block needs to be saved to the database.
public bool $modified
return boolean