You are here

public function SaveSortableViewsChanges::render in Sortableviews 8

Render the area.

Parameters

bool $empty: (optional) Indicator if view result is empty or not. Defaults to FALSE.

Return value

array In any case we need a valid Drupal render array to return.

Overrides AreaPluginBase::render

File

src/Plugin/views/area/SaveSortableViewsChanges.php, line 20

Class

SaveSortableViewsChanges
A container where the save button will appear.

Namespace

Drupal\sortableviews\Plugin\views\area

Code

public function render($empty = FALSE) {
  if (!$empty) {
    return [
      '#type' => 'html_tag',
      '#tag' => 'span',
      '#value' => '',
      '#attributes' => [
        'class' => [
          'sortableviews-save-changes',
        ],
        'id' => Html::getUniqueId('sortableviews-save-changes'),
      ],
    ];
  }
  return [];
}