Property | Type | Description | |
---|---|---|---|
$config |
Method | Description | |
---|---|---|
__construct ( array $elements = [], |
Taxonomy constructor. | |
containsKeyValue ( $field, $value ) | ||
filter ( Closure $p ) | ||
getExisting ( ) : |
Gets the elements that have already been persisted | |
getField ( $fieldname ) : |
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 ( |
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. |
public __construct ( array $elements = [], |
||
$elements | array | |
$metadata |
public getExisting ( ) : |
||
return |
public getField ( $fieldname ) : |
||
$fieldname | ||
return |
public getOriginal ( $entity ) : mixed | null | ||
$entity | ||
return | mixed | null |