public function BackgroundImageManager::validView in Background Image 8
Same name and namespace in other branches
- 2.x src/BackgroundImageManager.php \Drupal\background_image\BackgroundImageManager::validView()
- 2.0.x src/BackgroundImageManager.php \Drupal\background_image\BackgroundImageManager::validView()
Checks whether a view can use background images.
Parameters
\Drupal\views\ViewEntityInterface $view: An ViewEntityInterface object.
Return value
bool TRUE or FALSE
Overrides BackgroundImageManagerInterface::validView
1 call to BackgroundImageManager::validView()
- BackgroundImageManager::getViewBackgroundImage in src/
BackgroundImageManager.php - Retrieves the bundle info for a given entity type.
File
- src/
BackgroundImageManager.php, line 736
Class
Namespace
Drupal\background_imageCode
public function validView(ViewEntityInterface $view) {
// Check enabled entity bundles.
if (!in_array("{$view->id()}:{$view->getExecutable()->current_display}", array_keys($this
->getViewsPages()))) {
return FALSE;
}
return TRUE;
}