You are here

protected function TokenReplacer::entityIdIsValid in Advanced Entity Tokens 2.x

Determines if an entity ID is valid.

Parameters

string $entity_id: The entity ID.

Return value

bool TRUE if the entity is valid; FALSE otherwise.

1 call to TokenReplacer::entityIdIsValid()
TokenReplacer::getReplacementsForTokenType in src/TokenReplacer.php
Fetches token replacements for specific token types.

File

src/TokenReplacer.php, line 292

Class

TokenReplacer
Class TokenReplacer.

Namespace

Drupal\aet

Code

protected function entityIdIsValid($entity_id) {
  return is_numeric($entity_id) || Uuid::isValid($entity_id);
}