public function BackgroundImageInterface::getTargetEntity in Background Image 8
Same name and namespace in other branches
- 2.x src/BackgroundImageInterface.php \Drupal\background_image\BackgroundImageInterface::getTargetEntity()
- 2.0.x src/BackgroundImageInterface.php \Drupal\background_image\BackgroundImageInterface::getTargetEntity()
Retrieves the target entity, if the type is supported and exists.
Parameters
int $type: The type. Defaults to the currently set type.
string $target: A target identifier split by a colon (:) where the entity type is on the left and the UUID of the entity to load is on the right. Defaults to the currently set target.
string $langcode: (optional) The language of the current context. Defaults to the current content language.
array $context: (optional) An associative array of arbitrary data that can be useful to determine the proper fallback sequence.
Return value
\Drupal\Core\Entity\EntityInterface|null The target Entity object or NULL if not a valid target.
1 method overrides BackgroundImageInterface::getTargetEntity()
- BackgroundImage::getTargetEntity in src/
Entity/ BackgroundImage.php - Retrieves the target entity, if the type is supported and exists.
File
- src/
BackgroundImageInterface.php, line 239
Class
- BackgroundImageInterface
- Provides an interface defining a Background Image entity.
Namespace
Drupal\background_imageCode
public function getTargetEntity($type = NULL, $target = NULL, $langcode = NULL, array $context = []);