mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 16:22:20 +02:00
N°4076 - Allow block parameters to change the behaviour of blocks on the page
This commit is contained in:
@@ -70,8 +70,8 @@ class GlobalSearch extends UIBlock implements iKeyboardShortcut
|
||||
$this->SetEndpoint(static::DEFAULT_ENDPOINT_REL_URL);
|
||||
$this->SetQuery('');
|
||||
$this->SetLastQueries($aLastQueries);
|
||||
$this->bShowHistory = (bool) MetaModel::GetConfig()->Get('global_search.show_history');
|
||||
$this->iMaxHistoryResults = (int) MetaModel::GetConfig()->Get('global_search.max_history_results');
|
||||
$this->bShowHistory = (bool)MetaModel::GetConfig()->Get('global_search.show_history');
|
||||
$this->iMaxHistoryResults = (int)MetaModel::GetConfig()->Get('global_search.max_history_results');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -41,6 +41,7 @@ class TopBarFactory
|
||||
* @param array|null $aBreadcrumbsEntry Current breadcrumbs entry to add
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Layout\TopBar\TopBar
|
||||
* @throws \ConfigException
|
||||
* @throws \CoreException
|
||||
* @throws \CoreUnexpectedValue
|
||||
* @throws \MySQLException
|
||||
@@ -49,18 +50,15 @@ class TopBarFactory
|
||||
{
|
||||
$oTopBar = new TopBar(TopBar::BLOCK_CODE);
|
||||
|
||||
if (utils::GetConfig()->Get('quick_create.enabled') === true)
|
||||
{
|
||||
if (utils::GetConfig()->Get('quick_create.enabled') === true) {
|
||||
$oTopBar->SetQuickCreate(QuickCreateFactory::MakeFromUserHistory());
|
||||
}
|
||||
|
||||
if (utils::GetConfig()->Get('global_search.enabled') === true)
|
||||
{
|
||||
if (utils::GetConfig()->Get('global_search.enabled') === true) {
|
||||
$oTopBar->SetGlobalSearch(GlobalSearchFactory::MakeFromUserHistory());
|
||||
}
|
||||
|
||||
if(utils::GetConfig()->Get('breadcrumb.enabled') === true)
|
||||
{
|
||||
if (utils::GetConfig()->Get('breadcrumb.enabled') === true) {
|
||||
$oBreadcrumbs = new Breadcrumbs($aBreadcrumbsEntry, Breadcrumbs::BLOCK_CODE);
|
||||
|
||||
$oTopBar->SetBreadcrumbs($oBreadcrumbs);
|
||||
|
||||
Reference in New Issue
Block a user