You are here

public function BackgroundImageManagerInterface::getEntityFromCurrentRoute in Background Image 8

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

Retrieves the current route entity object.

Parameters

string $entity_type: The type of entity to retrieve from the current route.

string $bundle: The entity bundle type to retrieve from the current route.

Return value

\Drupal\Core\Entity\EntityInterface|null The current route entity object, if one exists.

1 method overrides BackgroundImageManagerInterface::getEntityFromCurrentRoute()
BackgroundImageManager::getEntityFromCurrentRoute in src/BackgroundImageManager.php
Retrieves the current route entity object.

File

src/BackgroundImageManagerInterface.php, line 215

Class

BackgroundImageManagerInterface

Namespace

Drupal\background_image

Code

public function getEntityFromCurrentRoute($entity_type = NULL, $bundle = NULL);