mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 19:48:49 +02:00
Merge branch 'support/3.2' into develop
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2013-2024 Combodo SAS
|
||||
*
|
||||
@@ -19,7 +20,6 @@
|
||||
|
||||
namespace Combodo\iTop\Application\UI\Base\Component\QuickCreate;
|
||||
|
||||
|
||||
use Combodo\iTop\Application\UI\Base\UIBlock;
|
||||
use Combodo\iTop\Application\UI\Hook\iKeyboardShortcut;
|
||||
use MetaModel;
|
||||
@@ -81,7 +81,7 @@ class QuickCreate extends UIBlock implements iKeyboardShortcut
|
||||
{
|
||||
parent::__construct($sId);
|
||||
$this->SetEndpoint(static::DEFAULT_ENDPOINT_REL_URL);
|
||||
$this->aAvailableClasses = $this->FilterAvailableClasses(UserRights::GetAllowedClasses(UR_ACTION_CREATE, array('bizmodel'), true));
|
||||
$this->aAvailableClasses = $this->FilterAvailableClasses(UserRights::GetAllowedClasses(UR_ACTION_CREATE, ['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');
|
||||
@@ -141,14 +141,14 @@ class QuickCreate extends UIBlock implements iKeyboardShortcut
|
||||
{
|
||||
$aFilteredClasses = [];
|
||||
|
||||
foreach ($aClasses as $sClassName => $sClassLabel){
|
||||
foreach ($aClasses as $sClassName => $sClassLabel) {
|
||||
// Skip not derivating from cmdbAbstractObject
|
||||
if(false === is_a($sClassName, '\cmdbAbstractObject', true)) {
|
||||
if (false === is_a($sClassName, '\cmdbAbstractObject', true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Skip n:n classes
|
||||
if(MetaModel::IsLinkClass($sClassName)) {
|
||||
if (MetaModel::IsLinkClass($sClassName)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -236,4 +236,4 @@ class QuickCreate extends UIBlock implements iKeyboardShortcut
|
||||
{
|
||||
return "[data-role='".static::BLOCK_CODE."']";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2013-2024 Combodo SAS
|
||||
*
|
||||
@@ -19,7 +20,6 @@
|
||||
|
||||
namespace Combodo\iTop\Application\UI\Base\Component\QuickCreate;
|
||||
|
||||
|
||||
/**
|
||||
* Class QuickCreateFactory
|
||||
*
|
||||
@@ -44,4 +44,4 @@ class QuickCreateFactory
|
||||
|
||||
return new QuickCreate($aLastClasses, QuickCreate::BLOCK_CODE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user