PHP 클래스 Webiny\Component\Entity\Attribute\Many2ManyAttribute

상속: extends AbstractCollectionAttribute, use trait Webiny\Component\Mongo\MongoTrait
파일 보기 프로젝트 열기: Webiny/Framework 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$addedItems
$intermediateCollection

공개 메소드들

메소드 설명
__construct ( $attribute = null, AbstractEntity $entity = null, $collectionName )
getValue ( array $params = [], boolean $processCallbacks = true ) : null | EntityCollection Get attribute value
hasValue ( )
save ( ) Insert links into DB
setValue ( null $value = null, boolean $fromDb = false ) Set or get attribute value
unlink ( string | AbstractEntity $item ) : boolean Remove item from many2many collection (removes the link between entities)
unlinkAll ( ) : boolean Remove all items from man2many collection (removes the links between entities)

보호된 메소드들

메소드 설명
extractClassName ( $class ) : string Extract short class name from class namespace
load ( ) : EntityCollection Load many2many attribute value (prepares MongoCursor, lazy loads data)
unlinkItem ( string | AbstractEntity $item ) : boolean Unlink given item (only removes the aggregation record)

메소드 상세

__construct() 공개 메소드

public __construct ( $attribute = null, AbstractEntity $entity = null, $collectionName )
$entity Webiny\Component\Entity\AbstractEntity

extractClassName() 보호된 메소드

Extract short class name from class namespace
protected extractClassName ( $class ) : string
$class
리턴 string

getValue() 공개 메소드

Get attribute value
public getValue ( array $params = [], boolean $processCallbacks = true ) : null | EntityCollection
$params array
$processCallbacks boolean
리턴 null | Webiny\Component\Entity\EntityCollection

hasValue() 공개 메소드

public hasValue ( )

load() 보호된 메소드

Load many2many attribute value (prepares MongoCursor, lazy loads data)
protected load ( ) : EntityCollection
리턴 Webiny\Component\Entity\EntityCollection

save() 공개 메소드

Insert links into DB
public save ( )

setValue() 공개 메소드

Set or get attribute value
public setValue ( null $value = null, boolean $fromDb = false )
$value null
$fromDb boolean

unlinkAll() 공개 메소드

Remove all items from man2many collection (removes the links between entities)
public unlinkAll ( ) : boolean
리턴 boolean

unlinkItem() 보호된 메소드

Unlink given item (only removes the aggregation record)
protected unlinkItem ( string | AbstractEntity $item ) : boolean
$item string | Webiny\Component\Entity\AbstractEntity
리턴 boolean

프로퍼티 상세

$addedItems 보호되어 있는 프로퍼티

protected $addedItems

$intermediateCollection 보호되어 있는 프로퍼티

protected $intermediateCollection