You are here

public function GridStackListBuilder::render in GridStack 8

Same name and namespace in other branches
  1. 8.2 modules/gridstack_ui/src/Controller/GridStackListBuilder.php \Drupal\gridstack_ui\Controller\GridStackListBuilder::render()

Adds some descriptive text to the gridstack optionsets list.

Return value

array Renderable array.

Overrides DraggableListBuilder::render

See also

admin/config/development/configuration/single/export

File

modules/gridstack_ui/src/Controller/GridStackListBuilder.php, line 169

Class

GridStackListBuilder
Provides a listing of GridStack optionsets.

Namespace

Drupal\gridstack_ui\Controller

Code

public function render() {
  $build['description'] = [
    '#markup' => $this
      ->t("<p>Manage the GridStack optionsets. Optionsets are Config Entities.</p><p>By default, when this module is enabled, four optionsets are created from configuration: Default Admin, Default Frontend, Default Bootstrap/ Foundation. Install GridStack example module to speed up by cloning them. Use the Operations column to edit, clone and delete optionsets. GridStack supports both magazine layout (GridStack JS), and static float layout (Bootstrap/ Foundation). The main difference is no fixed height, no JS, just CSS, for static float layout. Visit <a href=':ui'>GridStack UI</a> page to enable its support. To generate icons, edit and save optionsets. Press <code>F5</code>, or <code>CTRL/CMD + R</code> to refresh cached icons whenever updated.<br><strong>Important!</strong><br>Avoid overriding Default Admin (hidden) optionset as it is meant for Default -- checking and cleaning the frontend. Use Duplicate Default Frontend (GridStack JS), or Default Bootstrap/ Foundation, accordingly instead. Otherwise possible messes.<br>Use <a href=':url'>config_update</a> module to revert to stored optionsets at <em>/admin/config/development/configuration/report/module/gridstack</em>, if needed.</p>", [
      ':ui' => Url::fromRoute('gridstack.settings')
        ->toString(),
      ':url' => '//drupal.org/project/config_update',
    ]),
  ];
  $build[] = parent::render();
  $build['#attached']['library'][] = 'blazy/load';
  $build['#attached']['library'][] = 'gridstack/admin';
  return $build;
}