Fix "Try to get an inexistent pane." when clicking on the "Search" tab

This commit is contained in:
Eric Lippmann 2015-08-03 13:00:03 +02:00
parent 139baffdc6
commit ea5db51213
1 changed files with 19 additions and 0 deletions

View File

@ -19,6 +19,25 @@ class SearchDashboard extends Dashboard
*/
const SEARCH_PANE = 'search';
/**
* {@inheritdoc}
*/
public function getTabs()
{
if ($this->tabs === null) {
$this->tabs = new Tabs();
$this->tabs->add(
'search',
array(
'title' => t('Show Search', 'dashboard.pane.tooltip'),
'label' => t('Search'),
'url' => Url::fromRequest()
)
);
}
return $this->tabs;
}
/**
* Load all available search dashlets from modules
*