You are here

public function EntityTraversal::getEntities in General Data Protection Regulation 8.2

Same name and namespace in other branches
  1. 8 modules/gdpr_fields/src/EntityTraversal.php \Drupal\gdpr_fields\EntityTraversal::getEntities()
  2. 3.0.x modules/gdpr_fields/src/EntityTraversal.php \Drupal\gdpr_fields\EntityTraversal::getEntities()

Get the calculated actual calling points.

This will calculate them if they haven't been calculated exist.

Return value

\Drupal\Core\Entity\EntityInterface[]|null Either an array of entities or NULL if we couldn't find them.

File

modules/gdpr_fields/src/EntityTraversal.php, line 323

Class

EntityTraversal
Base class for traversing entities.

Namespace

Drupal\gdpr_fields

Code

public function getEntities() {
  try {
    if ($this
      ->traverse()) {
      return $this->entities;
    }
  } catch (Exception $exception) {
    return NULL;
  }
  return NULL;
}