public function BackgroundImageManager::getEntityConfig in Background Image 8
Same name and namespace in other branches
- 2.x src/BackgroundImageManager.php \Drupal\background_image\BackgroundImageManager::getEntityConfig()
- 2.0.x src/BackgroundImageManager.php \Drupal\background_image\BackgroundImageManager::getEntityConfig()
Retrieves an entity property value from the config.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: An entity.
string $property: A nested property to pluck.
Return value
mixed
Overrides BackgroundImageManagerInterface::getEntityConfig
1 call to BackgroundImageManager::getEntityConfig()
- BackgroundImageManager::alterEntityForm in src/
BackgroundImageManager.php - Perform alterations before a form is rendered.
File
- src/
BackgroundImageManager.php, line 463
Class
Namespace
Drupal\background_imageCode
public function getEntityConfig(EntityInterface $entity, $property) {
$entity_type = $entity
->getEntityTypeId();
$bundle = $entity
->bundle();
$config = $this
->getEntityConfigArray($entity_type, $bundle, $property);
return isset($config[$entity_type][$bundle]) ? $config[$entity_type][$bundle] : NULL;
}