class FilterDependencyCalculationFieldsEvent in Dependency Calculation 8
The FilterDependencyCalculationFieldsEvent event.
Hierarchy
- class \Drupal\depcalc\Event\FilterDependencyCalculationFieldsEvent extends \Symfony\Component\EventDispatcher\Event
 
Expanded class hierarchy of FilterDependencyCalculationFieldsEvent
1 file declares its use of FilterDependencyCalculationFieldsEvent
File
- src/
Event/ FilterDependencyCalculationFieldsEvent.php, line 12  
Namespace
Drupal\depcalc\EventView source
class FilterDependencyCalculationFieldsEvent extends Event {
  /**
   * The entity to calculate dependencies.
   *
   * @var \Drupal\Core\Entity\ContentEntityInterface
   */
  protected $entity;
  /**
   * The entity fields.
   *
   * @var \Drupal\Core\Field\FieldItemListInterface[]
   */
  protected $fields;
  /**
   * FilterDependencyCalculationFieldsEvent constructor.
   *
   * @param \Drupal\Core\Entity\ContentEntityInterface $entity
   *   The entity.
   * @param \Drupal\Core\Field\FieldItemListInterface ...$fields
   *   The fields.
   */
  public function __construct(ContentEntityInterface $entity, FieldItemListInterface ...$fields) {
    $this->entity = $entity;
    $this->fields = $fields;
  }
  /**
   * Retrieve the entity object
   *
   * @return \Drupal\Core\Entity\ContentEntityInterface
   *   The entity.
   */
  public function getEntity() {
    return $this->entity;
  }
  /**
   * Get the fields to be filtered.
   *
   * @return \Drupal\Core\Field\FieldItemListInterface[]
   *   The fields.
   */
  public function getFields() {
    return $this->fields;
  }
  /**
   * Set a filtered list of fields.
   *
   * @param \Drupal\Core\Field\FieldItemListInterface ...$fields
   *   The fields.
   */
  public function setFields(FieldItemListInterface ...$fields) {
    $this->fields = $fields;
  }
}Members
| 
            Name | 
                  Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| 
            FilterDependencyCalculationFieldsEvent:: | 
                  protected | property | The entity to calculate dependencies. | |
| 
            FilterDependencyCalculationFieldsEvent:: | 
                  protected | property | The entity fields. | |
| 
            FilterDependencyCalculationFieldsEvent:: | 
                  public | function | Retrieve the entity object | |
| 
            FilterDependencyCalculationFieldsEvent:: | 
                  public | function | Get the fields to be filtered. | |
| 
            FilterDependencyCalculationFieldsEvent:: | 
                  public | function | Set a filtered list of fields. | |
| 
            FilterDependencyCalculationFieldsEvent:: | 
                  public | function | FilterDependencyCalculationFieldsEvent constructor. |