mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
N°2847 - Rework iTopWebPage layout (WIP Part VI)
- iTopWebPage: Restore "open search" feature - iTopWebPage: Change all resources URL to absolute in order to benefit from the "duplicate removal" benefits - iTopWebPage: Remove obsolete method IsMenuPaneVisible() - Config: Add new parameters quick_create.enabled / global_search.enabled / breadcrumb.enabled - utils: Add new GetAppRevisionNumber() method - Introduce iUIBlock interface for UI layouts, components, ... - Introduce BlockRenderer to properly render blocks - Add "render_block" function to TwigHelper to render blocks directly from TWIG - Refactor layouts and components into proper block classes to fit the new architecture
This commit is contained in:
108
sources/application/UI/iUIBlock.php
Normal file
108
sources/application/UI/iUIBlock.php
Normal file
@@ -0,0 +1,108 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2013-2020 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
namespace Combodo\iTop\Application\UI;
|
||||
|
||||
|
||||
/**
|
||||
* Interface iUIBlock
|
||||
*
|
||||
* @package Combodo\iTop\Application\UI
|
||||
* @internal
|
||||
* @since 2.8.0
|
||||
*/
|
||||
interface iUIBlock
|
||||
{
|
||||
/**
|
||||
* Return the relative path (from <ITOP>/templates/) of the global template (HTML, JS, CSS) to use or null if it's not provided. Should not be used to often as JS/CSS files would be duplicated making the browser parsing time way longer.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public static function GetGlobalTemplateRelPath();
|
||||
|
||||
/**
|
||||
* Return the relative path (from <ITOP>/templates/) of the HTML template to use or null if no HTML to render
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public static function GetHtmlTemplateRelPath();
|
||||
|
||||
/**
|
||||
* Return the relative path (from <ITOP>/templates/) of the JS template to use or null if there is no inline JS to render
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public static function GetJsTemplateRelPath();
|
||||
|
||||
/**
|
||||
* Return an array of the relative paths (from <ITOP>/) of the JS files to use
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function GetJsFilesRelPaths();
|
||||
|
||||
/**
|
||||
* Return the relative path (from <ITOP>/templates/) of the CSS template to use or null if there is no inline CSS to render
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public static function GetCssTemplateRelPath();
|
||||
|
||||
/**
|
||||
* Return an array of the relative paths (from <ITOP>/) of the CSS files to use
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function GetCssFilesRelPaths();
|
||||
|
||||
/**
|
||||
* Return the ID of the block
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function GetId();
|
||||
|
||||
/**
|
||||
* Return an array iUIBlock embedded in this iUIBlock
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\iUIBlock[]
|
||||
*/
|
||||
public function GetSubBlocks();
|
||||
|
||||
/**
|
||||
* Return an array of the JS files URL of the block and its sub blocks.
|
||||
* URL is relative unless the $bAbsolutePath is set to true.
|
||||
*
|
||||
* @param bool $bAbsoluteUrl
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function GetJsFilesUrlRecursively($bAbsoluteUrl = false);
|
||||
|
||||
/**
|
||||
* Return an array of the CSS files URL of the block and its sub blocks.
|
||||
* URL is relative unless the $bAbsolutePath is set to true.
|
||||
*
|
||||
* @param bool $bAbsoluteUrl
|
||||
*
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function GetCssFilesUrlRecursively($bAbsoluteUrl = false);
|
||||
}
|
||||
Reference in New Issue
Block a user