You are here

public static function BackgroundImageFormTrait::tokenExists in Background Image 2.0.x

Same name and namespace in other branches
  1. 8 src/BackgroundImageFormTrait.php \Drupal\background_image\BackgroundImageFormTrait::tokenExists()
  2. 2.x src/BackgroundImageFormTrait.php \Drupal\background_image\BackgroundImageFormTrait::tokenExists()

Determines if the "token" module exists.

Return value

bool TRUE or FALSE

1 call to BackgroundImageFormTrait::tokenExists()
BackgroundImageFormTrait::getTokenEntityMapper in src/BackgroundImageFormTrait.php
Retrieves the Token Entity Mapper service.

File

src/BackgroundImageFormTrait.php, line 675

Class

BackgroundImageFormTrait
Trait BackgroundImageFormTrait.

Namespace

Drupal\background_image

Code

public static function tokenExists() {
  if (!isset(self::$tokenExists)) {
    self::$tokenExists = \Drupal::moduleHandler()
      ->moduleExists('token');
  }
  return self::$tokenExists;
}