'file' => 'system.admin.inc',
],
'admin_block' => [
- 'variables' => ['block' => NULL],
+ 'variables' => ['block' => NULL, 'attributes' => []],
'file' => 'system.admin.inc',
],
'admin_block_content' => [
],
'template' => 'entity-add-list',
],
+ 'off_canvas_page_wrapper' => [
+ 'variables' => ['children' => NULL],
+ ],
]);
}
* $form_state->setRedirectUrl(system_authorized_get_url());
* @endcode
*
- * @param $callback
+ * @param callable $callback
* The name of the function to invoke once the user authorizes the operation.
* @param $file
* The full path to the file where the callback function is implemented.
$path = file_build_uri(drupal_basename($parsed_url['path']));
}
else {
- if (is_dir(drupal_realpath($destination))) {
+ if (is_dir(\Drupal::service('file_system')->realpath($destination))) {
// Prevent URIs with triple slashes when glueing parts together.
$path = str_replace('///', '//', "$destination/") . drupal_basename($parsed_url['path']);
}
$handler = $query->getMetadata('entity_reference_selection_handler');
$handler->entityQueryAlter($query);
}
+
+/**
+ * Implements hook_element_info_alter().
+ */
+function system_element_info_alter(&$type) {
+ if (isset($type['page'])) {
+ $type['page']['#theme_wrappers']['off_canvas_page_wrapper'] = ['#weight' => -1000];
+ }
+}