PHP Class Pimcore\Model\Dependency

Inheritance: extends AbstractModel
Show file Open project: pimcore/pimcore Class Usage Examples

Public Properties

Property Type Description
$requiredBy integer Contains the ID/type of objects that need the given source object (sourceId/sourceType)
$requires integer Contains the ID/type of objects which are required for the given source object (sourceId/sourceType)
$sourceId integer The ID of the object to get dependencies for
$sourceType string The type of the object to get dependencies for

Public Methods

Method Description
addRequirement ( integer $id, string $type ) : void Add a requirement to the source object
clean ( ) : void Cleanup the dependencies for current source id
cleanAllForElement ( Element\ELementInterface $element ) : void
getBySourceId ( integer $id, string $type ) : Dependency Static helper to get the dependencies for the given sourceId & type
getRequiredBy ( ) : array
getRequires ( ) : array
getSourceId ( ) : integer
getSourceType ( ) : string
isRequired ( ) : void Check if the source object is required by an other object (an other object depends on this object)
setRequiredBy ( array $requiredBy ) : void
setRequires ( array $requires )
setSourceId ( integer $sourceId )
setSourceType ( string $sourceType ) : void

Method Details

addRequirement() public method

Add a requirement to the source object
public addRequirement ( integer $id, string $type ) : void
$id integer
$type string
return void

clean() public method

Cleanup the dependencies for current source id
public clean ( ) : void
return void

cleanAllForElement() public method

public cleanAllForElement ( Element\ELementInterface $element ) : void
$element Element\ELementInterface
return void

getBySourceId() public static method

Static helper to get the dependencies for the given sourceId & type
public static getBySourceId ( integer $id, string $type ) : Dependency
$id integer
$type string
return Dependency

getRequiredBy() public method

public getRequiredBy ( ) : array
return array

getRequires() public method

public getRequires ( ) : array
return array

getSourceId() public method

public getSourceId ( ) : integer
return integer

getSourceType() public method

public getSourceType ( ) : string
return string

isRequired() public method

Check if the source object is required by an other object (an other object depends on this object)
public isRequired ( ) : void
return void

setRequiredBy() public method

public setRequiredBy ( array $requiredBy ) : void
$requiredBy array
return void

setRequires() public method

public setRequires ( array $requires )
$requires array

setSourceId() public method

public setSourceId ( integer $sourceId )
$sourceId integer

setSourceType() public method

public setSourceType ( string $sourceType ) : void
$sourceType string
return void

Property Details

$requiredBy public property

Contains the ID/type of objects that need the given source object (sourceId/sourceType)
public int $requiredBy
return integer

$requires public property

Contains the ID/type of objects which are required for the given source object (sourceId/sourceType)
public int $requires
return integer

$sourceId public property

The ID of the object to get dependencies for
public int $sourceId
return integer

$sourceType public property

The type of the object to get dependencies for
public string $sourceType
return string