mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 19:18:44 +02:00
N°7194 - Add link to datamodel class schema on object details (#613)
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
namespace Combodo\iTop\Application\TwigBase\Twig;
|
||||
|
||||
|
||||
use ApplicationMenu;
|
||||
use AttributeDate;
|
||||
use AttributeDateTime;
|
||||
use AttributeText;
|
||||
@@ -182,6 +183,13 @@ class Extension
|
||||
return utils::GetAbsoluteUrlModulesRoot();
|
||||
});
|
||||
|
||||
// Function to check if current user can access to the given menu
|
||||
// Usage in twig: {% if is_backoffice_menu_enabled('DataModelMenu') %}
|
||||
/** @since 3.2.0 */
|
||||
$aFunctions[] = new TwigFunction('is_backoffice_menu_enabled', function ($sMenuId) {
|
||||
return ApplicationMenu::IsMenuIdEnabled($sMenuId);
|
||||
});
|
||||
|
||||
// Function to render a UI block (HTML, inline CSS, inline JS) and its sub blocks directly in the TWIG
|
||||
// Usage in twig: {{ render_block(oBlock) }}
|
||||
/** @since 3.0.0 */
|
||||
|
||||
Reference in New Issue
Block a user