class FilterDependencyConfigEntityEvent in Dependency Calculation 8
Class FilterDependencyConfigEntityEvent
Hierarchy
- class \Drupal\depcalc\Event\FilterDependencyConfigEntityEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of FilterDependencyConfigEntityEvent
1 file declares its use of FilterDependencyConfigEntityEvent
- ConfigEntityDependencyCollector.php in src/
EventSubscriber/ DependencyCollector/ ConfigEntityDependencyCollector.php
File
- src/
Event/ FilterDependencyConfigEntityEvent.php, line 11
Namespace
Drupal\depcalc\EventView source
class FilterDependencyConfigEntityEvent extends Event {
/**
* Whether or not to calculate this config entity as a dependency.
*
* @var bool
*/
protected $calculate = TRUE;
/**
* The dependent entity wrapper.
*
* @var \Drupal\depcalc\DependentEntityWrapper
*/
protected $wrapper;
/**
* FilterDependencyConfigEntityEvent constructor.
*
* @param \Drupal\depcalc\DependentEntityWrapper $wrapper
* The entity wrapper for calculation.
*/
public function __construct(DependentEntityWrapper $wrapper) {
$this->wrapper = $wrapper;
}
/**
* Get the wrapper of the entity we are considering calculating.
*
* @return \Drupal\depcalc\DependentEntityWrapper
* The entity wrapper for calculation.
*/
public function getWrapper() {
return $this->wrapper;
}
/**
* Get the entity we are considering calculating.
*
* @return \Drupal\Core\Entity\EntityInterface
* The entity for calculation.
*/
public function getEntity() {
return $this->wrapper
->getEntity();
}
/**
* Set whether if this config entity should be calculated for dependencies.
*
* @param bool $calculate
* Whether or not to calculate this entity.
*/
public function setCalculable(bool $calculate) {
$this->calculate = $calculate;
}
/**
* Whether this config entity should be dependency calculated.
*
* @return bool
* Whether or not to calculate this entity.
*/
public function isCalculable() {
return $this->calculate;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FilterDependencyConfigEntityEvent:: |
protected | property | Whether or not to calculate this config entity as a dependency. | |
FilterDependencyConfigEntityEvent:: |
protected | property | The dependent entity wrapper. | |
FilterDependencyConfigEntityEvent:: |
public | function | Get the entity we are considering calculating. | |
FilterDependencyConfigEntityEvent:: |
public | function | Get the wrapper of the entity we are considering calculating. | |
FilterDependencyConfigEntityEvent:: |
public | function | Whether this config entity should be dependency calculated. | |
FilterDependencyConfigEntityEvent:: |
public | function | Set whether if this config entity should be calculated for dependencies. | |
FilterDependencyConfigEntityEvent:: |
public | function | FilterDependencyConfigEntityEvent constructor. |