PHP Class Pimcore\Model\Object\Service

Inheritance: extends Pimcore\Model\Element\Service
Show file Open project: pimcore/pimcore Class Usage Examples

Protected Properties

Property Type Description
$_copyRecursiveIds array
$_user Pimcore\Model\User
$systemFields array System fields used by filter conditions

Public Methods

Method Description
__construct ( User $user = null )
addGridFeatureJoins ( $list, $featureJoins, $class, $featureFilters, $requestedLanguage ) Adds all the query stuff that is needed for displaying, filtering and exporting the feature grid data.
copyAsChild ( AbstractObject $target, AbstractObject $source ) : AbstractObject
copyContents ( $target, $source ) : AbstractObject
copyRecursive ( $target, $source ) : mixed
createSuperLayout ( &$layout )
enrichLayoutDefinition ( &$layout, $object = null ) Enriches the layout definition before it is returned to the admin interface.
extractLocalizedFieldDefinitions ( $layout, $targetList, $insideLocalizedField ) : mixed
getCalculatedFieldValue ( $object, $data ) : mixed | null
getCalculatedFieldValueForEditMode ( $object, $params = [], $data ) : mixed | null
getCustomGridFieldDefinitions ( $classId, $objectId )
getCustomLayoutDefinitionForGridColumnConfig ( ClassDefinition $class, integer $objectId ) : array Determines the custom layout definition (if necessary) for the given class
getFeatureFilters ( string $filterJson, ClassDefinition $class ) : string
getFieldForBrickType ( ClassDefinition $class, $bricktype ) : integer | null | string
getFilterCondition ( string $filterJson, ClassDefinition $class ) : string
getLanguagePermissions ( $object, $user, $type ) : array | null
getLayoutPermissions ( $classId, $permissionSet ) : array | null
getObjectsReferencingUser ( integer $userId ) : Concrete[] finds all objects which hold a reference to a specific user
getOptionsForMultiSelectField ( $object, $fieldname ) : array alias of getOptionsForMultiSelectField
getOptionsForSelectField ( $object, $fieldname ) : array
getSuperLayoutDefinition ( Concrete $object ) : mixed Calculates the super layout definition for the given object.
getSystemFields ( ) : array
getUniqueKey ( $item, $nr )
getValidLayouts ( Concrete $object ) : array
gridObjectData ( AbstractObject $object, $fields = null, $requestedLanguage = null ) : array Language only user for classification store !!!
hasInheritableParentObject ( Concrete $object ) : AbstractObject | null
loadAllObjectFields ( Concrete $object ) : void call the getters of each object field, in case some of the are lazy loading and we need the data to be loaded
pathExists ( $path, $type = null ) : boolean
rewriteIds ( $object, $rewriteConfig ) : AbstractObject Rewrites id from source to target, $rewriteConfig contains array( "document" => array( SOURCE_ID => TARGET_ID, SOURCE_ID => TARGET_ID ), "object" => array(.
synchronizeCustomLayout ( CustomLayout $customLayout ) Synchronizes a custom layout with its master layout

Private Methods

Method Description
doFilterCustomGridFieldDefinitions ( &$layout, $fieldDefinitions ) : boolean
getValueForObject ( $object, $key, $brickType = null, $brickKey = null, $fieldDefinition = null ) : stdclass, gets value for given object and getter, including inherited values
mergeFieldDefinition ( &$mergedFieldDefinition, &$customFieldDefinitions, $key )
synchronizeCustomLayoutFieldWithMaster ( $masterDefinition, &$layout ) : boolean

Method Details

__construct() public method

public __construct ( User $user = null )
$user Pimcore\Model\User

addGridFeatureJoins() public static method

Adds all the query stuff that is needed for displaying, filtering and exporting the feature grid data.
public static addGridFeatureJoins ( $list, $featureJoins, $class, $featureFilters, $requestedLanguage )
$list list
$featureJoins
$class
$featureFilters
$requestedLanguage

copyAsChild() public method

public copyAsChild ( AbstractObject $target, AbstractObject $source ) : AbstractObject
$target AbstractObject
$source AbstractObject
return AbstractObject copied object

copyContents() public method

public copyContents ( $target, $source ) : AbstractObject
$target
$source
return AbstractObject

copyRecursive() public method

public copyRecursive ( $target, $source ) : mixed
$target
$source
return mixed

createSuperLayout() public static method

public static createSuperLayout ( &$layout )

enrichLayoutDefinition() public static method

Enriches the layout definition before it is returned to the admin interface.
public static enrichLayoutDefinition ( &$layout, $object = null )
$layout

extractLocalizedFieldDefinitions() public static method

public static extractLocalizedFieldDefinitions ( $layout, $targetList, $insideLocalizedField ) : mixed
$layout
$targetList
$insideLocalizedField
return mixed

getCalculatedFieldValue() public static method

public static getCalculatedFieldValue ( $object, $data ) : mixed | null
$object
$data Model\Object\Data\CalculatedValue
return mixed | null

getCalculatedFieldValueForEditMode() public static method

public static getCalculatedFieldValueForEditMode ( $object, $params = [], $data ) : mixed | null
$object
$data Model\Object\Data\CalculatedValue
return mixed | null

getCustomGridFieldDefinitions() public static method

public static getCustomGridFieldDefinitions ( $classId, $objectId )

getCustomLayoutDefinitionForGridColumnConfig() public static method

Determines the custom layout definition (if necessary) for the given class
public static getCustomLayoutDefinitionForGridColumnConfig ( ClassDefinition $class, integer $objectId ) : array
$class ClassDefinition
$objectId integer
return array layout

getFeatureFilters() public static method

public static getFeatureFilters ( string $filterJson, ClassDefinition $class ) : string
$filterJson string
$class ClassDefinition
return string

getFieldForBrickType() public static method

public static getFieldForBrickType ( ClassDefinition $class, $bricktype ) : integer | null | string
$class ClassDefinition
$bricktype
return integer | null | string

getFilterCondition() public static method

public static getFilterCondition ( string $filterJson, ClassDefinition $class ) : string
$filterJson string
$class ClassDefinition
return string

getLanguagePermissions() public static method

public static getLanguagePermissions ( $object, $user, $type ) : array | null
$object
$user
$type
return array | null

getLayoutPermissions() public static method

public static getLayoutPermissions ( $classId, $permissionSet ) : array | null
$classId
$permissionSet
return array | null

getObjectsReferencingUser() public static method

finds all objects which hold a reference to a specific user
public static getObjectsReferencingUser ( integer $userId ) : Concrete[]
$userId integer
return Concrete[]

getOptionsForMultiSelectField() public static method

alias of getOptionsForMultiSelectField
public static getOptionsForMultiSelectField ( $object, $fieldname ) : array
$object
$fieldname
return array

getOptionsForSelectField() public static method

public static getOptionsForSelectField ( $object, $fieldname ) : array
$object
$fieldname
return array

getSuperLayoutDefinition() public static method

Calculates the super layout definition for the given object.
public static getSuperLayoutDefinition ( Concrete $object ) : mixed
$object Concrete
return mixed

getSystemFields() public static method

public static getSystemFields ( ) : array
return array

getUniqueKey() public static method

public static getUniqueKey ( $item, $nr )

getValidLayouts() public static method

public static getValidLayouts ( Concrete $object ) : array
$object Concrete
return array

gridObjectData() public static method

Language only user for classification store !!!
public static gridObjectData ( AbstractObject $object, $fields = null, $requestedLanguage = null ) : array
$object AbstractObject
return array

hasInheritableParentObject() public static method

public static hasInheritableParentObject ( Concrete $object ) : AbstractObject | null
$object Concrete
return AbstractObject | null

loadAllObjectFields() public static method

call the getters of each object field, in case some of the are lazy loading and we need the data to be loaded
public static loadAllObjectFields ( Concrete $object ) : void
$object Concrete
return void

pathExists() public static method

public static pathExists ( $path, $type = null ) : boolean
$path
return boolean

rewriteIds() public static method

..), "asset" => array(...) )
public static rewriteIds ( $object, $rewriteConfig ) : AbstractObject
$object
$rewriteConfig
return AbstractObject

synchronizeCustomLayout() public static method

Synchronizes a custom layout with its master layout
public static synchronizeCustomLayout ( CustomLayout $customLayout )
$customLayout Pimcore\Model\Object\ClassDefinition\CustomLayout

Property Details

$_copyRecursiveIds protected property

protected array $_copyRecursiveIds
return array

$_user protected property

protected User,Pimcore\Model $_user
return Pimcore\Model\User

$systemFields protected static property

System fields used by filter conditions
protected static array $systemFields
return array