You are here

public function Control::render in Styled Google Map 8.2

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 Text::render

File

src/Plugin/views/area/Control.php, line 68

Class

Control
Views area text handler.

Namespace

Drupal\styled_google_map\Plugin\views\area

Code

public function render($empty = FALSE) {
  $output = parent::render($empty);
  if (!empty($output)) {
    return [
      '#type' => 'container',
      '#attributes' => [
        'class' => 'google-map-control',
        'data-position' => Xss::filter($this->options['position']),
        'id' => uniqid('control-'),
      ],
      'control' => $output,
    ];
  }
}