You are here

public static function BackgroundImage::getTypes in Background Image 8

Same name and namespace in other branches
  1. 2.x src/Entity/BackgroundImage.php \Drupal\background_image\Entity\BackgroundImage::getTypes()
  2. 2.0.x src/Entity/BackgroundImage.php \Drupal\background_image\Entity\BackgroundImage::getTypes()

Retrieves all the types.

Return value

array An indexed array where the type is the key and the label is the value.

Overrides BackgroundImageInterface::getTypes

4 calls to BackgroundImage::getTypes()
BackgroundImage::baseFieldDefinitions in src/Entity/BackgroundImage.php
Provides base field definitions for an entity type.
BackgroundImage::getTypeLabel in src/Entity/BackgroundImage.php
The type label.
BackgroundImageForm::buildTypeSelection in src/Form/BackgroundImageForm.php
Builds the new type selection step.
BackgroundImageForm::validate in src/Form/BackgroundImageForm.php
Validation handler.

File

src/Entity/BackgroundImage.php, line 594

Class

BackgroundImage
Defines the Background Image entity.

Namespace

Drupal\background_image\Entity

Code

public static function getTypes() {
  return [
    self::TYPE_GLOBAL => t('Global'),
    self::TYPE_ENTITY => t('Entity'),
    self::TYPE_ENTITY_BUNDLE => t('Entity Bundle'),
    // @todo Re-enable once support has been properly done.
    // self::TYPE_PATH => t('Path'),
    // self::TYPE_ROUTE => t('Route'),
    self::TYPE_VIEW => t('View'),
  ];
}