Builds and returns the renderable array for this block plugin.
array A renderable array representing the content of the block.
Overrides BlockPluginInterface::build
\Drupal\block\BlockRenderController
public function build() {
if ($output = $this->view
->executeDisplay($this->displayID)) {
$output = $this->view
->executeDisplay($this->displayID);
// Set the label to the title configured in the view.
$this->configuration['label'] = filter_xss_admin($this->view
->getTitle());
// Before returning the block output, convert it to a renderable array
// with contextual links.
$this
->addContextualLinks($output);
$this->view
->destroy();
return $output;
}
return array();
}