N°3620 - Add confg. parameter to disable "quick create" history

This commit is contained in:
Molkobain
2021-01-13 10:40:31 +01:00
parent 6a33fbc7b3
commit 9221899525
4 changed files with 29 additions and 4 deletions

View File

@@ -55,6 +55,8 @@ class QuickCreate extends UIBlock
protected $aLastClasses;
/** @var int $iMaxAutocompleteResults Max. number of elements returned by the autocomplete */
protected $iMaxAutocompleteResults;
/** @var bool $bShowHistory Whether or not to display the elements in the history */
protected $bShowHistory;
/** @var int $iMaxHistoryResults Max. number of elements in the history */
protected $iMaxHistoryResults;
@@ -73,6 +75,7 @@ class QuickCreate extends UIBlock
$this->aAvailableClasses = UserRights::GetAllowedClasses(UR_ACTION_CREATE, array('bizmodel'), true);
$this->aLastClasses = $aLastClasses;
$this->iMaxAutocompleteResults = (int) MetaModel::GetConfig()->Get('quick_create.max_autocomplete_results');
$this->bShowHistory = (bool) MetaModel::GetConfig()->Get('quick_create.show_history');
$this->iMaxHistoryResults = (int) MetaModel::GetConfig()->Get('quick_create.max_history_results');
}
@@ -119,6 +122,15 @@ class QuickCreate extends UIBlock
return $this->iMaxAutocompleteResults;
}
/**
* @see $bShowHistory
* @return bool
*/
public function GetShowHistory(): bool
{
return $this->bShowHistory;
}
/**
* @see $iMaxHistoryResults
* @return int