Issue #2995078 by sugaroverflow, dead_arm: Add a title to the off-canvas dialog when opened by clicking "Add Block"

8.7.x
Lauri Eskola 2018-09-28 14:32:01 +03:00
parent 9b28e1f79b
commit 9ee0227bdd
No known key found for this signature in database
GPG Key ID: 40F093680B4404E6
1 changed files with 3 additions and 0 deletions

View File

@ -5,6 +5,7 @@ namespace Drupal\layout_builder\Controller;
use Drupal\Core\Ajax\AjaxHelperTrait;
use Drupal\Core\Block\BlockManagerInterface;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\Url;
use Drupal\layout_builder\Context\LayoutBuilderContextTrait;
use Drupal\layout_builder\SectionStorageInterface;
@ -19,6 +20,7 @@ class ChooseBlockController implements ContainerInjectionInterface {
use AjaxHelperTrait;
use LayoutBuilderContextTrait;
use StringTranslationTrait;
/**
* The block manager.
@ -60,6 +62,7 @@ class ChooseBlockController implements ContainerInjectionInterface {
* A render array.
*/
public function build(SectionStorageInterface $section_storage, $delta, $region) {
$build['#title'] = $this->t('Choose a block');
$build['#type'] = 'container';
$build['#attributes']['class'][] = 'block-categories';