drupal_required_modules

drupal_required_modules() Returns an array of modules required by core. File core/includes/module.inc, line 146 API for loading and interacting with Drupal modules. Code function drupal_required_modules() { $listing = new ExtensionDiscovery(\Drupal::root()); $files = $listing->scan('module'); $required = array(); // Unless called by the installer, an installation profile is required and // must always be loaded. drupal_get_profile() also returns the installation // profile in

DRUPAL_REQUIRED

Required option on forms and settings File core/modules/system/system.module, line 59 Configuration system that lets administrators modify the workings of the site. Code const DRUPAL_REQUIRED = 2;

drupal_render_root

drupal_render_root(&$elements) Renders final HTML given a structured array tree. Deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0. Use the 'renderer' service instead. See also \Drupal\Core\Render\RendererInterface::renderRoot() File core/includes/common.inc, line 857 Common functions that many Drupal modules will need to reference. Code function drupal_render_root(&$elements) { return \Drupal::service('renderer')->renderRoot($elements); }

drupal_render_children

drupal_render_children(&$element, $children_keys = NULL) Renders children of an element and concatenates them. Parameters array $element: The structured array whose children shall be rendered. array $children_keys: (optional) If the keys of the element's children are already known, they can be passed in to save another run of \Drupal\Core\Render\Element::children(). Return value string|\Drupal\Component\Render\MarkupInterface The rendered HTML of all children of the element. Deprecated

drupal_render

drupal_render(&$elements, $is_recursive_call = FALSE) Renders HTML given a structured array tree. Deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0. Use the 'renderer' service instead. See also \Drupal\Core\Render\RendererInterface::render() File core/includes/common.inc, line 869 Common functions that many Drupal modules will need to reference. Code function drupal_render(&$elements, $is_recursive_call = FALSE) { return \Drupal::service('renderer')->render($

drupal_register_shutdown_function

&drupal_register_shutdown_function($callback = NULL) Registers a function for execution on shutdown. Wrapper for register_shutdown_function() that catches thrown exceptions to avoid "Exception thrown without a stack frame in Unknown". Parameters $callback: The shutdown function to register. ...: Additional arguments to pass to the shutdown function. Return value Array of shutdown functions to be executed. See also register_shutdown_function() Related topics PHP wrapper functions Function

drupal_rebuild

drupal_rebuild(ClassLoader $class_loader, Request $request) Rebuilds all caches even when Drupal itself does not work. Parameters \Composer\Autoload\ClassLoader $class_loader: The class loader. \Symfony\Component\HttpFoundation\Request $request: The current request. See also rebuild.php File core/includes/utility.inc, line 24 Miscellaneous functions. Code function drupal_rebuild(ClassLoader $class_loader, Request $request) { // Remove Drupal's error and exception handlers; they rely on a

drupal_realpath

drupal_realpath($uri) Resolves the absolute filepath of a local URI or filepath. Deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. Use \Drupal\Core\File\FileSystem::realpath(). Related topics File interface Common file handling functions. File core/includes/file.inc, line 1127 API for handling file uploads and server file management. Code function drupal_realpath($uri) { return \Drupal::service('file_system')->realpath($uri); }

drupal_process_states

drupal_process_states(&$elements) Adds JavaScript to change the state of an element based on another element. A "state" means a certain property on a DOM element, such as "visible" or "checked". A state can be applied to an element, depending on the state of another element on the page. In general, states depend on HTML attributes and DOM element properties, which change due to user interaction. Since states are driven by JavaScript only, it is important to understand that all states are ap

drupal_pre_render_links

drupal_pre_render_links($element) Pre-render callback: Collects child links into a single array. This function can be added as a pre_render callback for a renderable array, usually one which will be themed by links.html.twig. It iterates through all unrendered children of the element, collects any #links properties it finds, merges them into the parent element's #links array, and prevents those children from being rendered separately. The purpose of this is to allow links to be logically groupe