class StarterkitThemeHooks
Same name and namespace in other branches
- 11.x core/themes/starterkit_theme/src/Hook/StarterkitThemeHooks.php \Drupal\starterkit_theme\Hook\StarterkitThemeHooks
Hook implementations for starterkit_theme.
Hierarchy
- class \Drupal\starterkit_theme\Hook\StarterkitThemeHooks
Expanded class hierarchy of StarterkitThemeHooks
File
-
core/
themes/ starterkit_theme/ src/ Hook/ StarterkitThemeHooks.php, line 10
Namespace
Drupal\starterkit_theme\HookView source
class StarterkitThemeHooks {
/**
* @file
* Functions to support theming.
*/
/**
* Implements hook_preprocess_image_widget().
*/
public function preprocessImageWidget(array &$variables) : void {
$data =& $variables['data'];
// This prevents image widget templates from rendering preview container
// HTML to users that do not have permission to access these previews.
// @todo revisit in https://drupal.org/node/953034
// @todo revisit in https://drupal.org/node/3114318
if (isset($data['preview']['#access']) && $data['preview']['#access'] === FALSE) {
unset($data['preview']);
}
}
}
Members
| Title Sort descending | Modifiers | Object type | Summary |
|---|---|---|---|
| StarterkitThemeHooks::preprocessImageWidget | public | function | Implements hook_preprocess_image_widget(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.