Method |
Description |
|
add ( array $values, array $targetPk = null, string $position = 'first', integer $scope = null ) : array |
|
|
clear ( ) : boolean |
Do whatever is needed, to clear all items out of this object scope. |
|
clearCache ( ) |
Clears the internal cache. This is called when the defined object has been changed. |
|
configure ( string $objectKey, Object $definition ) |
Important call directly after the creation of this class. |
|
drop ( ) : boolean |
Removes anything that is required to hold the data. E.g. SQL Tables, Drop Sequences, etc. |
|
export ( Condition $condition = null ) : array |
Exports all data as array |
|
getBranch ( array $pk = null, Condition $condition = null, integer $depth = 1, mixed $scope = null, array $options = null ) : array |
Returns a branch if the object is a nested set. |
|
getBranchChildrenCount ( null $pk = null, Condition $condition = null, null $scope = null ) : array |
|
|
getCount ( Condition $condition = null ) : integer |
|
|
getDefinition ( ) |
|
|
getField ( string $fieldKey ) : array |
Returns a field definition. |
|
getItem ( array $pk, array $options = null ) : array |
$pOptions is a array which can contain following options. All options are optional. |
|
getItems ( array $filter = null, Condition $condition = null, array $options = null ) |
$pOptions is a array which can contain following options. All options are optional. |
|
getNestedSubCondition ( Condition $condition ) : Condition |
Builds a condition for the sub-items check in \Jarves\Permissions::getListingCondition() for nested set objects. |
|
getObjectKey ( ) : string |
Returns the object key. |
|
getParent ( array $pk, array $options = null ) : mixed |
Returns the parent if exists otherwise false. |
|
getParentId ( array $pk ) : array |
Returns parent's pk, if exists, otherwise null. |
|
getParents ( array $pk ) : array |
Returns all parents. |
|
getPrimaryKeys ( ) : array |
Returns the primary keys as array. |
|
getRoots ( Condition $condition = null, array $options = null ) |
|
|
move ( array $pk, array $targetPk, string $position = 'first', $targetObjectKey = null ) : boolean |
Moves a item to a new position. |
|
normalizePrimaryKey ( mixed $pk ) : array |
Normalizes a primary key, that is normally used inside PHP classes,
since developers are lazy and we need to convert the lazy primary key
to the full definition. |
|
patch ( array $pk, array $values ) |
Patches a object entry. This means, only defined fields will be saved. Fields which are not defined will
not be overwritten. |
|
primaryStringToArray ( string $pk ) : array |
Converts given primary values from type string into proper normalized array definition. |
|
remove ( array $pk ) |
|
|
search ( string $query, Condition $condition = null, integer $max = 20 ) : array | null |
Executes a search to this object, filter by $query and optional by a more complet condition $condition. |
|
setDefinition ( $definition ) |
|
|
setPrimaryKeys ( $pks ) |
|
|
update ( array $pk, array $values ) |
Updates an object entry. This means, all fields which are not defined will be saved as NULL. |
|