You are here

interface DependentEntityWrapperInterface in Dependency Calculation 8

Interface DependentEntityWrapperInterface.

Hierarchy

Expanded class hierarchy of DependentEntityWrapperInterface

All classes that implement DependentEntityWrapperInterface

3 files declare their use of DependentEntityWrapperInterface
BaseDependencyCollector.php in src/EventSubscriber/DependencyCollector/BaseDependencyCollector.php
CalculateEntityDependenciesEvent.php in src/Event/CalculateEntityDependenciesEvent.php
DependencyHelperTrait.php in tests/src/Kernel/DependencyHelperTrait.php

File

src/DependentEntityWrapperInterface.php, line 8

Namespace

Drupal\depcalc
View source
interface DependentEntityWrapperInterface {

  /**
   * Get the entity for which we are collecting dependencies.
   *
   * @return \Drupal\Core\Entity\EntityInterface
   */
  public function getEntity();

  /**
   * The id of the entity.
   *
   * @return int|null|string
   */
  public function getId();

  /**
   * The uuid of the entity.
   *
   * @return null|string
   */
  public function getUuid();

  /**
   * Set remote uuid.
   *
   * @param null|string $uuid
   */
  public function setRemoteUuid($uuid);

  /**
   * Get remote uuid.
   *
   * @return null|string
   *   The uuid.
   */
  public function getRemoteUuid();

  /**
   * The entity type id.
   *
   * @return string
   */
  public function getEntityTypeId();

  /**
   * Get the uuid/hash values of dependencies of this entity.
   *
   * @return string[]
   */
  public function getDependencies();

  /**
   * Get the uuid/hash values of direct child dependencies of this entity.
   *
   * @return string[]
   *   Array of direct child dependencies of this entity.
   */
  public function getChildDependencies() : array;

  /**
   * Document a new dependency for this entity.
   *
   * @param \Drupal\depcalc\DependentEntityWrapperInterface $dependency
   *   The dependency to add.
   * @param \Drupal\depcalc\DependencyStack $stack
   *   The dependency stack.
   * @param bool $direct_child
   *   Whether given wrapper is a direct child.
   */
  public function addDependency(DependentEntityWrapperInterface $dependency, DependencyStack $stack, bool $direct_child = TRUE);

  /**
   * Add dependencies of this entity.
   *
   * @param \Drupal\depcalc\DependencyStack $stack
   *   The dependency stack.
   * @param \Drupal\depcalc\DependentEntityWrapperInterface ...$dependencies
   *   Entities wrappers to add as a dependency.
   */
  public function addDependencies(DependencyStack $stack, DependentEntityWrapperInterface ...$dependencies);

  /**
   * Add new module dependencies.
   *
   * @param array $modules
   *   The list of modules to add as dependencies.
   */
  public function addModuleDependencies(array $modules);

  /**
   * The list of module dependencies.
   *
   * @return string[]
   */
  public function getModuleDependencies();

  /**
   * The hash value of the entity.
   *
   * @return mixed
   */
  public function getHash();

  /**
   * Whether any additional processing is needed.
   *
   * @return bool
   */
  public function needsAdditionalProcessing();

}

Members

Namesort descending Modifiers Type Description Overrides
DependentEntityWrapperInterface::addDependencies public function Add dependencies of this entity. 1
DependentEntityWrapperInterface::addDependency public function Document a new dependency for this entity. 1
DependentEntityWrapperInterface::addModuleDependencies public function Add new module dependencies. 1
DependentEntityWrapperInterface::getChildDependencies public function Get the uuid/hash values of direct child dependencies of this entity. 1
DependentEntityWrapperInterface::getDependencies public function Get the uuid/hash values of dependencies of this entity. 1
DependentEntityWrapperInterface::getEntity public function Get the entity for which we are collecting dependencies. 1
DependentEntityWrapperInterface::getEntityTypeId public function The entity type id. 1
DependentEntityWrapperInterface::getHash public function The hash value of the entity. 1
DependentEntityWrapperInterface::getId public function The id of the entity. 1
DependentEntityWrapperInterface::getModuleDependencies public function The list of module dependencies. 1
DependentEntityWrapperInterface::getRemoteUuid public function Get remote uuid. 1
DependentEntityWrapperInterface::getUuid public function The uuid of the entity. 1
DependentEntityWrapperInterface::needsAdditionalProcessing public function Whether any additional processing is needed. 1
DependentEntityWrapperInterface::setRemoteUuid public function Set remote uuid. 1