Property | Type | Description | |
---|---|---|---|
$em |
Method | Description | |
---|---|---|
__construct ( array $elements = [], |
Relations constructor. | |
getField ( string $fieldName, boolean $biDirectional = false, string $contentTypeName = null, integer $contentTypeId = null ) : |
Gets a specific relation type name from the overall collection | |
getOriginal ( Bolt\Storage\Entity\Relations $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 four key properties if there's a match it returns the original, otherwise it returns the new and adds the new one to the collection. | |
incoming ( |
Identifies which relations are incoming to the given entity | |
offsetGet ( $offset ) | Overrides the default to allow fetching a sub-selection. | |
setEntityManager ( |
||
setFromDatabaseValues ( array $result ) | ||
setFromPost ( array $formValues, |
||
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 | |
$em |
public getOriginal ( Bolt\Storage\Entity\Relations $entity ) : mixed | null | ||
$entity | Bolt\Storage\Entity\Relations | |
return | mixed | null |
public setEntityManager ( |
||
$em |
public setFromPost ( array $formValues, |
||
$formValues | array | |
$entity |