PHP Class Webiny\Component\Entity\Attribute\AbstractCollectionAttribute

Inheritance: extends AbstractAttribute, implements IteratorAggregate, implements ArrayAccess, use trait Webiny\Component\StdLib\StdLibTrait
Mostra file Open project: Webiny/Framework Class Usage Examples

Protected Properties

Property Type Description
$entityClass
$value null | Webiny\Component\Entity\EntityCollection

Public Methods

Method Description
__toString ( ) : mixed | null | string Get string of masked entity values when array of instances is being converted to string
count ( ) : integer Count items in result set
delete ( ) : boolean Delete all items in the result set
getEntity ( ) : string Get related entity class for this attribute
getIterator ( )
getParentEntity ( ) : AbstractEntity Returns entity instance to which this attribute belongs
offsetExists ( $offset )
offsetGet ( $offset )
offsetSet ( $offset, $value )
offsetUnset ( $offset )
setEntity ( string $entityClass ) Set related entity class for this attribute

Protected Methods

Method Description
normalizeValue ( mixed $value ) : array Normalize given value to be a valid array of entity instances

Method Details

__toString() public method

Get string of masked entity values when array of instances is being converted to string
public __toString ( ) : mixed | null | string
return mixed | null | string

count() public method

Count items in result set
public count ( ) : integer
return integer

delete() public method

Delete all items in the result set
public delete ( ) : boolean
return boolean

getEntity() public method

Get related entity class for this attribute
public getEntity ( ) : string
return string

getIterator() public method

public getIterator ( )

getParentEntity() public method

Returns entity instance to which this attribute belongs
public getParentEntity ( ) : AbstractEntity
return Webiny\Component\Entity\AbstractEntity

normalizeValue() protected method

Normalize given value to be a valid array of entity instances
protected normalizeValue ( mixed $value ) : array
$value mixed
return array

offsetExists() public method

public offsetExists ( $offset )

offsetGet() public method

public offsetGet ( $offset )

offsetSet() public method

public offsetSet ( $offset, $value )

offsetUnset() public method

public offsetUnset ( $offset )

setEntity() public method

Set related entity class for this attribute
public setEntity ( string $entityClass )
$entityClass string

Property Details

$entityClass protected_oe property

protected $entityClass

$value protected_oe property

protected null|EntityCollection,Webiny\Component\Entity $value
return null | Webiny\Component\Entity\EntityCollection