function FormHooks::useStickyActionButtons
Same name and namespace in other branches
- main core/themes/admin/src/Hook/FormHooks.php \Drupal\admin\Hook\FormHooks::useStickyActionButtons()
Determines the feature flag to use for sticky action buttons.
Parameters
bool $is_content_form: TRUE if this should return the flag for content forms, FALSE if it should return the flag for any form.
Return value
bool TRUE if core_admin_theme_use_sticky_action_buttons is enabled, FALSE otherwise.
2 calls to FormHooks::useStickyActionButtons()
- FormHooks::formAfterBuild in core/
themes/ admin/ src/ Hook/ FormHooks.php - Helper function to remember the form actions after form has been built.
- FormHooks::stickyActionButtonsAndSidebar in core/
themes/ admin/ src/ Hook/ FormHooks.php - Add some major form overrides.
File
-
core/
themes/ admin/ src/ Hook/ FormHooks.php, line 793
Class
- FormHooks
- Provides form related hook implementations.
Namespace
Drupal\admin\HookCode
private static function useStickyActionButtons(bool $is_content_form = TRUE) : bool {
$flag = CoreSettings::get('core_admin_theme_use_sticky_action_buttons', 'never');
return $is_content_form ? $flag === 'content_forms' || $flag === 'always' : $flag === 'always';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.