PHP Class Pimcore\Model\Dependency

Inheritance: extends AbstractModel
Afficher le fichier Open project: pimcore/pimcore Class Usage Examples

Méthodes publiques

Свойство 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

Méthodes publiques

Méthode 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 méthode

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

clean() public méthode

Cleanup the dependencies for current source id
public clean ( ) : void
Résultat void

cleanAllForElement() public méthode

public cleanAllForElement ( Element\ELementInterface $element ) : void
$element Element\ELementInterface
Résultat void

getBySourceId() public static méthode

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

getRequiredBy() public méthode

public getRequiredBy ( ) : array
Résultat array

getRequires() public méthode

public getRequires ( ) : array
Résultat array

getSourceId() public méthode

public getSourceId ( ) : integer
Résultat integer

getSourceType() public méthode

public getSourceType ( ) : string
Résultat string

isRequired() public méthode

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

setRequiredBy() public méthode

public setRequiredBy ( array $requiredBy ) : void
$requiredBy array
Résultat void

setRequires() public méthode

public setRequires ( array $requires )
$requires array

setSourceId() public méthode

public setSourceId ( integer $sourceId )
$sourceId integer

setSourceType() public méthode

public setSourceType ( string $sourceType ) : void
$sourceType string
Résultat void

Property Details

$requiredBy public_oe property

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

$requires public_oe property

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

$sourceId public_oe property

The ID of the object to get dependencies for
public int $sourceId
Résultat integer

$sourceType public_oe property

The type of the object to get dependencies for
public string $sourceType
Résultat string