diff --git a/core/modules/block/src/BlockListBuilder.php b/core/modules/block/src/BlockListBuilder.php index 18744e9..c8339e3 100644 --- a/core/modules/block/src/BlockListBuilder.php +++ b/core/modules/block/src/BlockListBuilder.php @@ -321,79 +321,6 @@ protected function buildBlocksForm() { } /** - * Builds the "Place Blocks" portion of the form. - * - * @return array - */ - protected function buildPlaceBlocksForm() { - $form['title'] = array( - '#type' => 'container', - '#markup' => '

' . $this->t('Place blocks') . '

', - '#attributes' => array( - 'class' => array( - 'entity-meta__header', - ), - ), - ); - - $form['filter'] = array( - '#type' => 'search', - '#title' => $this->t('Filter'), - '#title_display' => 'invisible', - '#size' => 30, - '#placeholder' => $this->t('Filter by block name'), - '#attributes' => array( - 'class' => array('block-filter-text'), - 'data-element' => '.entity-meta', - 'title' => $this->t('Enter a part of the block name to filter by.'), - ), - ); - - $form['list']['#type'] = 'container'; - $form['list']['#attributes']['class'][] = 'entity-meta'; - - // Only add blocks which work without any available context. - $contexts = $this->contextRepository->getAvailableContexts(); - $definitions = $this->blockManager->getDefinitionsForContexts($contexts); - $sorted_definitions = $this->blockManager->getSortedDefinitions($definitions); - foreach ($sorted_definitions as $plugin_id => $plugin_definition) { - $category = SafeMarkup::checkPlain($plugin_definition['category']); - $category_key = 'category-' . $category; - if (!isset($form['list'][$category_key])) { - $form['list'][$category_key] = array( - '#type' => 'details', - '#title' => $category, - '#open' => TRUE, - 'content' => array( - '#theme' => 'links', - '#links' => array(), - '#attributes' => array( - 'class' => array( - 'block-list', - ), - ), - ), - ); - } - $form['list'][$category_key]['content']['#links'][$plugin_id] = array( - 'title' => $plugin_definition['admin_label'], - 'url' => Url::fromRoute('block.admin_add', [ - 'plugin_id' => $plugin_id, - 'theme' => $this->theme - ]), - 'attributes' => array( - 'class' => array('use-ajax', 'block-filter-text-source'), - 'data-dialog-type' => 'modal', - 'data-dialog-options' => Json::encode(array( - 'width' => 700, - )), - ), - ); - } - return $form; - } - - /** * Gets the name of the theme used for this block listing. * * @return string