You are here

public function StubTracker::track in Acquia Content Hub 8.2

Adds potential stub entities to the tracker.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: A potential stub entity to track.

File

src/StubTracker.php, line 81

Class

StubTracker
Class StubTracker.

Namespace

Drupal\acquia_contenthub

Code

public function track(EntityInterface $entity) {
  if ($this
    ->isTracking()) {
    $this->stubs[$entity
      ->getEntityTypeId()][] = $entity
      ->id();
  }
}