PHP Class Webiny\Component\Entity\EntityAttributeBuilder

Show file Open project: Webiny/Framework Class Usage Examples

Public Properties

Property Type Description
$classMap

Protected Properties

Property Type Description
$attribute
$attributes
$entity

Public Methods

Method Description
__construct ( AbstractEntity $entity, ArrayObject $attributes )
arr ( ) : ArrayAttribute
attr ( $attribute ) Create a new attribute
boolean ( ) : BooleanAttribute
char ( ) : CharAttribute
date ( ) : DateAttribute
datetime ( ) : DateTimeAttribute
dynamic ( callable $callable ) : DynamicAttribute
float ( ) : FloatAttribute
geoPoint ( ) : GeoPointAttribute
integer ( ) : IntegerAttribute
many2many ( string $collectionName ) : Many2ManyAttribute
many2one ( ) : Many2OneAttribute
object ( ) : ObjectAttribute
one2many ( $relatedAttribute ) : One2ManyAttribute
smart ( AbstractAttribute $attribute ) : AbstractAttribute Set attribute instance

Method Details

__construct() public method

public __construct ( AbstractEntity $entity, ArrayObject $attributes )
$entity AbstractEntity
$attributes Webiny\Component\StdLib\StdObject\ArrayObject\ArrayObject

arr() public method

public arr ( ) : ArrayAttribute
return Webiny\Component\Entity\Attribute\ArrayAttribute

attr() public method

Create a new attribute
public attr ( $attribute )
$attribute

boolean() public method

public boolean ( ) : BooleanAttribute
return Webiny\Component\Entity\Attribute\BooleanAttribute

char() public method

public char ( ) : CharAttribute
return Webiny\Component\Entity\Attribute\CharAttribute

date() public method

public date ( ) : DateAttribute
return Webiny\Component\Entity\Attribute\DateAttribute

datetime() public method

public datetime ( ) : DateTimeAttribute
return Webiny\Component\Entity\Attribute\DateTimeAttribute

dynamic() public method

public dynamic ( callable $callable ) : DynamicAttribute
$callable callable
return Webiny\Component\Entity\Attribute\DynamicAttribute

float() public method

public float ( ) : FloatAttribute
return Webiny\Component\Entity\Attribute\FloatAttribute

geoPoint() public method

public geoPoint ( ) : GeoPointAttribute
return Webiny\Component\Entity\Attribute\GeoPointAttribute

integer() public method

public integer ( ) : IntegerAttribute
return Webiny\Component\Entity\Attribute\IntegerAttribute

many2many() public method

public many2many ( string $collectionName ) : Many2ManyAttribute
$collectionName string Intermediate collection name
return Webiny\Component\Entity\Attribute\Many2ManyAttribute

many2one() public method

public many2one ( ) : Many2OneAttribute
return Webiny\Component\Entity\Attribute\Many2OneAttribute

object() public method

public object ( ) : ObjectAttribute
return Webiny\Component\Entity\Attribute\ObjectAttribute

one2many() public method

public one2many ( $relatedAttribute ) : One2ManyAttribute
$relatedAttribute
return Webiny\Component\Entity\Attribute\One2ManyAttribute

smart() public method

Set attribute instance
public smart ( AbstractAttribute $attribute ) : AbstractAttribute
$attribute Webiny\Component\Entity\Attribute\AbstractAttribute
return Webiny\Component\Entity\Attribute\AbstractAttribute

Property Details

$attribute protected property

protected $attribute

$attributes protected property

protected $attributes

$classMap public static property

public static $classMap

$entity protected property

protected $entity