PHP 클래스 Bolt\Storage\Collection\Taxonomy

저자: Ross Riley ([email protected])
상속: extends Doctrine\Common\Collections\ArrayCollection
파일 보기 프로젝트 열기: bolt/bolt

공개 프로퍼티들

프로퍼티 타입 설명
$config

공개 메소드들

메소드 설명
__construct ( array $elements = [], MetadataDriver $metadata = null ) Taxonomy constructor.
containsKeyValue ( $field, $value )
filter ( Closure $p )
getExisting ( ) : Taxonomy Gets the elements that have already been persisted
getField ( $fieldname ) : Taxonomy Gets a specific taxonomy name from the overall collection
getNew ( ) * Gets the elements that have not yet been persisted
getOriginal ( $entity ) : mixed | null This loops over the existing collection to see if the properties in the incoming are already available on a saved record. To do this it checks the three key properties content_id, taxonomytype and slug, if there's a match it returns the original, otherwise it returns the new and adds the new one to the collection.
getSortorder ( $field, $slug )
offsetGet ( $offset ) Required by interface ArrayAccess.
setFromDatabaseValues ( $result )
setFromPost ( $formValues, $entity )
update ( Taxonomy $collection ) : array Runs a check on an incoming collection to make sure that duplicates are filtered out. Precedence is given to records that are already persisted, with any diff in incoming properties updated.

메소드 상세

__construct() 공개 메소드

Taxonomy constructor.
public __construct ( array $elements = [], MetadataDriver $metadata = null )
$elements array
$metadata Bolt\Storage\Mapping\MetadataDriver

containsKeyValue() 공개 메소드

public containsKeyValue ( $field, $value )

filter() 공개 메소드

public filter ( Closure $p )
$p Closure

getExisting() 공개 메소드

Gets the elements that have already been persisted
public getExisting ( ) : Taxonomy
리턴 Taxonomy

getField() 공개 메소드

Gets a specific taxonomy name from the overall collection
public getField ( $fieldname ) : Taxonomy
$fieldname
리턴 Taxonomy

getNew() 공개 메소드

* Gets the elements that have not yet been persisted
public getNew ( )

getOriginal() 공개 메소드

This loops over the existing collection to see if the properties in the incoming are already available on a saved record. To do this it checks the three key properties content_id, taxonomytype and slug, if there's a match it returns the original, otherwise it returns the new and adds the new one to the collection.
public getOriginal ( $entity ) : mixed | null
$entity
리턴 mixed | null

getSortorder() 공개 메소드

public getSortorder ( $field, $slug )

offsetGet() 공개 메소드

public offsetGet ( $offset )

setFromDatabaseValues() 공개 메소드

public setFromDatabaseValues ( $result )

setFromPost() 공개 메소드

public setFromPost ( $formValues, $entity )

update() 공개 메소드

Any records not in the incoming set are deleted from the collection and the deleted ones returned as an array.
public update ( Taxonomy $collection ) : array
$collection Taxonomy
리턴 array

프로퍼티 상세

$config 공개적으로 프로퍼티

public $config