diff --git a/core/includes/common.inc b/core/includes/common.inc index 1581de6..e05a1eb 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -3446,9 +3446,6 @@ function drupal_flush_all_caches() { // Reset all static caches. drupal_static_reset(); - // Clear all non-drupal_static() static caches. - \Drupal::entityManager()->clearCachedDefinitions(); - // Wipe the PHP Storage caches. PhpStorageFactory::get('service_container')->deleteAll(); PhpStorageFactory::get('twig')->deleteAll(); @@ -3498,6 +3495,9 @@ function drupal_flush_all_caches() { // Rebuild all information based on new module data. $module_handler->invokeAll('rebuild'); + // Clear all plugin caches. + \Drupal::service('plugin.cache_clearer')->clearCachedDefinitions(); + // Rebuild the menu router based on all rebuilt data. // Important: This rebuild must happen last, so the menu router is guaranteed // to be based on up to date information. diff --git a/core/modules/contextual/contextual.module b/core/modules/contextual/contextual.module index 01b9aef..66550f2 100644 --- a/core/modules/contextual/contextual.module +++ b/core/modules/contextual/contextual.module @@ -86,30 +86,6 @@ function contextual_help($route_name, RouteMatchInterface $route_match) { } /** - * Implements hook_element_info(). - * - * @todo Remove once https://www.drupal.org/node/2326409 is in. - */ -function contextual_element_info() { - $types['contextual_links_placeholder'] = array( - '#pre_render' => array('\Drupal\contextual\Element\ContextualLinksPlaceholder::preRenderPlaceholder'), - '#id' => NULL, - ); - $types['contextual_links'] = array( - '#pre_render' => array('\Drupal\contextual\Element\ContextualLinks::preRenderLinks'), - '#theme' => 'links__contextual', - '#links' => array(), - '#attributes' => array('class' => array('contextual-links')), - '#attached' => array( - 'library' => array( - 'contextual/drupal.contextual-links', - ), - ), - ); - return $types; -} - -/** * Implements hook_preprocess(). * * @see contextual_pre_render_placeholder() diff --git a/core/modules/contextual/src/Element/ContextualLinks.php b/core/modules/contextual/src/Element/ContextualLinks.php index 8aeec9f..180c01f 100644 --- a/core/modules/contextual/src/Element/ContextualLinks.php +++ b/core/modules/contextual/src/Element/ContextualLinks.php @@ -12,8 +12,7 @@ /** * Provides a contextual_links element. * - * @todo Annotate once https://www.drupal.org/node/2326409 is in. - * RenderElement("contextual_links") + * @RenderElement("contextual_links") */ class ContextualLinks extends RenderElement { diff --git a/core/modules/contextual/src/Element/ContextualLinksPlaceholder.php b/core/modules/contextual/src/Element/ContextualLinksPlaceholder.php index ebe90fb..d10078b 100644 --- a/core/modules/contextual/src/Element/ContextualLinksPlaceholder.php +++ b/core/modules/contextual/src/Element/ContextualLinksPlaceholder.php @@ -13,8 +13,7 @@ /** * Provides a contextual_links_placeholder element. * - * @todo Annotate once https://www.drupal.org/node/2326409 is in. - * RenderElement("contextual_links_placeholder") + * @RenderElement("contextual_links_placeholder") */ class ContextualLinksPlaceholder extends RenderElement { diff --git a/core/modules/field_ui/field_ui.module b/core/modules/field_ui/field_ui.module index e66da09..e8409e5 100644 --- a/core/modules/field_ui/field_ui.module +++ b/core/modules/field_ui/field_ui.module @@ -71,20 +71,6 @@ function field_ui_theme() { } /** - * Implements hook_element_info(). - * - * @todo Remove once https://www.drupal.org/node/2326409 is in. - */ -function field_ui_element_info() { - return array( - 'field_ui_table' => array( - '#theme' => 'field_ui_table', - '#regions' => array('' => array()), - ), - ); -} - -/** * Implements hook_entity_type_build(). */ function field_ui_entity_type_build(array &$entity_types) { diff --git a/core/modules/field_ui/src/Element/FieldUiTable.php b/core/modules/field_ui/src/Element/FieldUiTable.php index f34d6a4..361a17e 100644 --- a/core/modules/field_ui/src/Element/FieldUiTable.php +++ b/core/modules/field_ui/src/Element/FieldUiTable.php @@ -12,8 +12,7 @@ /** * Provides a field_ui table element. * - * @todo Annotate once https://www.drupal.org/node/2326409 is in. - * RenderElement("field_ui_table") + * @RenderElement("field_ui_table") */ class FieldUiTable extends RenderElement { diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module index cad200c..0cf6e42 100644 --- a/core/modules/filter/filter.module +++ b/core/modules/filter/filter.module @@ -87,34 +87,6 @@ function filter_theme() { } /** - * Implements hook_element_info(). - * - * @see filter_process_format() - * @see text_format_wrapper() - * - * @todo Remove once https://www.drupal.org/node/2326409 is in. - */ -function filter_element_info() { - $type['text_format'] = array( - '#process' => array( - '\Drupal\filter\Element\TextFormat::processFormat', - ), - '#base_type' => 'textarea', - '#theme_wrappers' => array('text_format_wrapper'), - ); - $type['processed_text'] = array( - '#text' => '', - '#format' => NULL, - '#filter_types_to_skip' => array(), - '#langcode' => '', - '#pre_render' => array( - '\Drupal\filter\Element\ProcessedText::preRenderText', - ), - ); - return $type; -} - -/** * Retrieves a list of enabled text formats, ordered by weight. * * @param \Drupal\Core\Session\AccountInterface|null $account diff --git a/core/modules/filter/src/Element/ProcessedText.php b/core/modules/filter/src/Element/ProcessedText.php index 9ddbc55..b4a0eb0 100644 --- a/core/modules/filter/src/Element/ProcessedText.php +++ b/core/modules/filter/src/Element/ProcessedText.php @@ -16,8 +16,7 @@ /** * Provides a processed text render element. * - * @todo Annotate once https://www.drupal.org/node/2326409 is in. - * RenderElement("processed_text") + * @RenderElement("processed_text") */ class ProcessedText extends RenderElement { diff --git a/core/modules/filter/src/Element/TextFormat.php b/core/modules/filter/src/Element/TextFormat.php index 72019fc..2716583 100644 --- a/core/modules/filter/src/Element/TextFormat.php +++ b/core/modules/filter/src/Element/TextFormat.php @@ -15,8 +15,7 @@ /** * Provides a text format render element. * - * @todo Annotate once https://www.drupal.org/node/2326409 is in. - * RenderElement("text_format") + * @enderElement("text_format") */ class TextFormat extends RenderElement { diff --git a/core/modules/language/language.module b/core/modules/language/language.module index 40b9bfa..a83b3ec 100644 --- a/core/modules/language/language.module +++ b/core/modules/language/language.module @@ -170,22 +170,6 @@ function language_process_language_select($element) { } /** - * Implements hook_element_info(). - * - * @todo Remove once https://www.drupal.org/node/2326409 is in. - */ -function language_element_info() { - $types['language_configuration'] = array( - '#input' => TRUE, - '#tree' => TRUE, - '#process' => array( - '\Drupal\language\Element\LanguageConfiguration::processLanguageConfiguration', - ), - ); - return $types; -} - -/** * Submit handler for the forms that have a language_configuration element. */ function language_configuration_element_submit(&$form, FormStateInterface $form_state) { diff --git a/core/modules/language/src/Element/LanguageConfiguration.php b/core/modules/language/src/Element/LanguageConfiguration.php index e24f8bd..68cb46c 100644 --- a/core/modules/language/src/Element/LanguageConfiguration.php +++ b/core/modules/language/src/Element/LanguageConfiguration.php @@ -14,8 +14,7 @@ /** * Provides language element configuration. * - * @todo Annotate once https://www.drupal.org/node/2326409 is in. - * FormElement("language_configuration") + * @FormElement("language_configuration") */ class LanguageConfiguration extends FormElement { diff --git a/core/modules/toolbar/src/Element/Toolbar.php b/core/modules/toolbar/src/Element/Toolbar.php index 700f5e2..1b682aa 100644 --- a/core/modules/toolbar/src/Element/Toolbar.php +++ b/core/modules/toolbar/src/Element/Toolbar.php @@ -12,8 +12,7 @@ /** * Provides a render element for the default Drupal toolbar. * - * @todo Annotate once https://www.drupal.org/node/2326409 is in. - * RenderElement("toolbar") + * @RenderElement("toolbar") */ class Toolbar extends RenderElement { diff --git a/core/modules/toolbar/src/Element/ToolbarItem.php b/core/modules/toolbar/src/Element/ToolbarItem.php index 18ade46..0eeb5c4 100644 --- a/core/modules/toolbar/src/Element/ToolbarItem.php +++ b/core/modules/toolbar/src/Element/ToolbarItem.php @@ -15,8 +15,7 @@ * * The 'tray' property contains a renderable array. * - * @todo Annotate once https://www.drupal.org/node/2326409 is in. - * RenderElement("toolbar_item") + * @RenderElement("toolbar_item") */ class ToolbarItem extends RenderElement { diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module index 2fbf64d..6c777ce 100644 --- a/core/modules/toolbar/toolbar.module +++ b/core/modules/toolbar/toolbar.module @@ -48,59 +48,6 @@ function toolbar_theme($existing, $type, $theme, $path) { } /** - * Implements hook_element_info(). - * - * @todo Remove once https://www.drupal.org/node/2326409 is in. - */ -function toolbar_element_info() { - $elements = array(); - - $elements['toolbar'] = array( - '#pre_render' => array( - '\Drupal\toolbar\Element\Toolbar::preRenderToolbar', - ), - '#theme' => 'toolbar', - '#attached' => array( - 'library' => array( - 'toolbar/toolbar', - ), - ), - // Metadata for the toolbar wrapping element. - '#attributes' => array( - // The id cannot be simply "toolbar" or it will clash with the simpletest - // tests listing which produces a checkbox with attribute id="toolbar" - 'id' => 'toolbar-administration', - 'role' => 'group', - 'aria-label' => t('Site administration toolbar'), - ), - // Metadata for the administration bar. - '#bar' => array( - '#heading' => t('Toolbar items'), - '#attributes' => array( - 'id' => 'toolbar-bar', - 'role' => 'navigation', - 'aria-label' => t('Toolbar items'), - ), - ), - ); - - // A toolbar item is wrapped in markup for common styling. The 'tray' - // property contains a renderable array. - $elements['toolbar_item'] = array( - '#pre_render' => array( - '\Drupal\toolbar\Element\ToolbarItem::preRenderToolbarItem', - ), - '#theme' => 'toolbar_item', - 'tab' => array( - '#type' => 'link', - '#title' => NULL, - '#href' => '', - ), - ); - return $elements; -} - -/** * Implements hook_page_build(). * * Add admin toolbar to the page_top region automatically. diff --git a/core/modules/views/src/Element/View.php b/core/modules/views/src/Element/View.php index 611c95f..c9e084b 100644 --- a/core/modules/views/src/Element/View.php +++ b/core/modules/views/src/Element/View.php @@ -13,8 +13,7 @@ /** * Provides a render element to display a view. * - * @todo Annotate once https://www.drupal.org/node/2326409 is in. - * RenderElement("view") + * @RenderElement("view") */ class View extends RenderElement { diff --git a/core/modules/views/views.module b/core/modules/views/views.module index 84b324f..360ab57 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -48,22 +48,6 @@ function views_help($route_name, RouteMatchInterface $route_match) { } /** - * Implements hook_element_info(). - * - * @todo Remove once https://www.drupal.org/node/2326409 is in. - */ -function views_element_info() { - $types['view'] = array( - '#theme_wrappers' => array('container'), - '#pre_render' => array('\Drupal\views\Element\View::preRenderViewElement'), - '#name' => NULL, - '#display_id' => 'default', - '#arguments' => array(), - ); - return $types; -} - -/** * Implements hook_views_pre_render(). */ function views_views_pre_render($view) {