You are here

public function GridStackVariantListBuilder::render in GridStack 8.2

Builds the entity listing as renderable array for table.html.twig.

@todo Add a link to add a new item to the #empty text.

Overrides GridStackListBuilder::render

File

modules/gridstack_ui/src/Controller/GridStackVariantListBuilder.php, line 42

Class

GridStackVariantListBuilder
Provides a listing of GridStack optionsets.

Namespace

Drupal\gridstack_ui\Controller

Code

public function render() {
  $build[] = parent::render();
  $build[0]['description'] = [
    '#markup' => '<p>' . $this
      ->t("Manage the GridStack layout variants. Add variants via Layout Builder, not here. Use this page as a convenient way to apply changes globally to all pages. Each variant may be re-used at different pages, and their change will apply globally. To have unique variant per page, simply create memorable labels, such as: <code>Twain: About</code> to apply at About page. To edit original layouts, hit <code>Source</code> under <code>Operations</code>.") . '</p>',
  ];
  return $build;
}