mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 01:28:47 +02:00
Add visibility to class constants (PHP >= 7.1)
This commit is contained in:
@@ -31,15 +31,15 @@ use utils;
|
||||
class Branding
|
||||
{
|
||||
/** @var string Full main logo, used everywhere when there is no need for a special one */
|
||||
const ENUM_LOGO_TYPE_MAIN_LOGO_FULL = 'main_logo_full';
|
||||
public const ENUM_LOGO_TYPE_MAIN_LOGO_FULL = 'main_logo_full';
|
||||
/** @var string Compact main logo, used in the collapsed menu of the backoffice */
|
||||
const ENUM_LOGO_TYPE_MAIN_LOGO_COMPACT = 'main_logo_compact';
|
||||
public const ENUM_LOGO_TYPE_MAIN_LOGO_COMPACT = 'main_logo_compact';
|
||||
/** @var string Logo used in the end-users portal */
|
||||
const ENUM_LOGO_TYPE_PORTAL_LOGO = 'portal_logo';
|
||||
public const ENUM_LOGO_TYPE_PORTAL_LOGO = 'portal_logo';
|
||||
/** @var string Logo used in the login pages */
|
||||
const ENUM_LOGO_TYPE_LOGIN_LOGO = 'login_logo';
|
||||
public const ENUM_LOGO_TYPE_LOGIN_LOGO = 'login_logo';
|
||||
/** @var string Default logo */
|
||||
const DEFAULT_LOGO_TYPE = self::ENUM_LOGO_TYPE_MAIN_LOGO_FULL;
|
||||
public const DEFAULT_LOGO_TYPE = self::ENUM_LOGO_TYPE_MAIN_LOGO_FULL;
|
||||
|
||||
/** @var \string[][] Relative paths to the default/custom logos from the current environment folder */
|
||||
public static $aLogoPaths = [
|
||||
|
||||
@@ -28,28 +28,28 @@ class TwigHelper
|
||||
* @var string ENUM_FILE_TYPE_HTML
|
||||
* @since 2.8.0
|
||||
*/
|
||||
const ENUM_FILE_TYPE_HTML = 'html';
|
||||
public const ENUM_FILE_TYPE_HTML = 'html';
|
||||
/**
|
||||
* @var string ENUM_FILE_TYPE_JS
|
||||
* @since 2.8.0
|
||||
*/
|
||||
const ENUM_FILE_TYPE_JS = 'js';
|
||||
public const ENUM_FILE_TYPE_JS = 'js';
|
||||
/**
|
||||
* @var string ENUM_FILE_TYPE_CSS
|
||||
* @since 2.8.0
|
||||
*/
|
||||
const ENUM_FILE_TYPE_CSS = 'css';
|
||||
public const ENUM_FILE_TYPE_CSS = 'css';
|
||||
/**
|
||||
* @var string ENUM_FILE_TYPE_SVG
|
||||
* @since 2.8.0
|
||||
*/
|
||||
const ENUM_FILE_TYPE_SVG = 'svg';
|
||||
public const ENUM_FILE_TYPE_SVG = 'svg';
|
||||
|
||||
/**
|
||||
* @var string DEFAULT_FILE_TYPE
|
||||
* @since 2.8.0
|
||||
*/
|
||||
const DEFAULT_FILE_TYPE = self::ENUM_FILE_TYPE_HTML;
|
||||
public const DEFAULT_FILE_TYPE = self::ENUM_FILE_TYPE_HTML;
|
||||
|
||||
/**
|
||||
* Return a TWIG environment instance looking for templates under $sViewPath.
|
||||
|
||||
@@ -32,48 +32,48 @@ use Combodo\iTop\Application\UI\UIBlock;
|
||||
class Alert extends UIBlock
|
||||
{
|
||||
// Overloaded constants
|
||||
const BLOCK_CODE = 'ibo-alert';
|
||||
const HTML_TEMPLATE_REL_PATH = 'components/alert/layout';
|
||||
const JS_TEMPLATE_REL_PATH = 'components/alert/layout';
|
||||
public const BLOCK_CODE = 'ibo-alert';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'components/alert/layout';
|
||||
public const JS_TEMPLATE_REL_PATH = 'components/alert/layout';
|
||||
|
||||
// Specific constants
|
||||
/** @var string ENUM_COLOR_PRIMARY */
|
||||
const ENUM_COLOR_PRIMARY = 'primary';
|
||||
public const ENUM_COLOR_PRIMARY = 'primary';
|
||||
/** @var string ENUM_COLOR_SECONDARY */
|
||||
const ENUM_COLOR_SECONDARY = 'secondary';
|
||||
public const ENUM_COLOR_SECONDARY = 'secondary';
|
||||
|
||||
/** @var string ENUM_COLOR_NEUTRAL */
|
||||
const ENUM_COLOR_NEUTRAL = 'neutral';
|
||||
public const ENUM_COLOR_NEUTRAL = 'neutral';
|
||||
/** @var string ENUM_COLOR_INFORMATION */
|
||||
const ENUM_COLOR_INFORMATION = 'information';
|
||||
public const ENUM_COLOR_INFORMATION = 'information';
|
||||
/** @var string ENUM_COLOR_SUCCESS */
|
||||
const ENUM_COLOR_SUCCESS = 'success';
|
||||
public const ENUM_COLOR_SUCCESS = 'success';
|
||||
/** @var string ENUM_COLOR_FAILURE */
|
||||
const ENUM_COLOR_FAILURE = 'failure';
|
||||
public const ENUM_COLOR_FAILURE = 'failure';
|
||||
/** @var string ENUM_COLOR_WARNING */
|
||||
const ENUM_COLOR_WARNING = 'warning';
|
||||
public const ENUM_COLOR_WARNING = 'warning';
|
||||
/** @var string ENUM_COLOR_DANGER */
|
||||
const ENUM_COLOR_DANGER = 'danger';
|
||||
public const ENUM_COLOR_DANGER = 'danger';
|
||||
|
||||
/** @var string ENUM_COLOR_GREY */
|
||||
const ENUM_COLOR_GREY = 'grey';
|
||||
public const ENUM_COLOR_GREY = 'grey';
|
||||
/** @var string ENUM_COLOR_BLUEGREY */
|
||||
const ENUM_COLOR_BLUEGREY = 'blue-grey';
|
||||
public const ENUM_COLOR_BLUEGREY = 'blue-grey';
|
||||
/** @var string ENUM_COLOR_BLUE */
|
||||
const ENUM_COLOR_BLUE = 'blue';
|
||||
public const ENUM_COLOR_BLUE = 'blue';
|
||||
/** @var string ENUM_COLOR_CYAN */
|
||||
const ENUM_COLOR_CYAN = 'cyan';
|
||||
public const ENUM_COLOR_CYAN = 'cyan';
|
||||
/** @var string ENUM_COLOR_GREEN */
|
||||
const ENUM_COLOR_GREEN = 'green';
|
||||
public const ENUM_COLOR_GREEN = 'green';
|
||||
/** @var string ENUM_COLOR_ORANGE */
|
||||
const ENUM_COLOR_ORANGE = 'orange';
|
||||
public const ENUM_COLOR_ORANGE = 'orange';
|
||||
/** @var string ENUM_COLOR_RED */
|
||||
const ENUM_COLOR_RED = 'red';
|
||||
public const ENUM_COLOR_RED = 'red';
|
||||
/** @var string ENUM_COLOR_PINK */
|
||||
const ENUM_COLOR_PINK = 'pink';
|
||||
public const ENUM_COLOR_PINK = 'pink';
|
||||
|
||||
/** @var string DEFAULT_COLOR */
|
||||
const DEFAULT_COLOR = self::ENUM_COLOR_NEUTRAL;
|
||||
public const DEFAULT_COLOR = self::ENUM_COLOR_NEUTRAL;
|
||||
|
||||
/** @var string $sTitle */
|
||||
protected $sTitle;
|
||||
|
||||
@@ -35,10 +35,10 @@ use utils;
|
||||
class Breadcrumbs extends UIBlock
|
||||
{
|
||||
// Overloaded constants
|
||||
const BLOCK_CODE = 'ibo-breadcrumbs';
|
||||
const HTML_TEMPLATE_REL_PATH = 'components/breadcrumbs/layout';
|
||||
const JS_TEMPLATE_REL_PATH = 'components/breadcrumbs/layout';
|
||||
const JS_FILES_REL_PATH = [
|
||||
public const BLOCK_CODE = 'ibo-breadcrumbs';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'components/breadcrumbs/layout';
|
||||
public const JS_TEMPLATE_REL_PATH = 'components/breadcrumbs/layout';
|
||||
public const JS_FILES_REL_PATH = [
|
||||
'js/components/breadcrumbs.js',
|
||||
];
|
||||
|
||||
|
||||
@@ -32,45 +32,45 @@ use Combodo\iTop\Application\UI\UIBlock;
|
||||
class Button extends UIBlock
|
||||
{
|
||||
// Overloaded constants
|
||||
const BLOCK_CODE = 'ibo-button';
|
||||
const HTML_TEMPLATE_REL_PATH = 'components/button/layout';
|
||||
const JS_TEMPLATE_REL_PATH = 'components/button/layout';
|
||||
public const BLOCK_CODE = 'ibo-button';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'components/button/layout';
|
||||
public const JS_TEMPLATE_REL_PATH = 'components/button/layout';
|
||||
|
||||
// Specific constants
|
||||
/** @var string ENUM_TYPE_BUTTON */
|
||||
const ENUM_TYPE_BUTTON = 'button';
|
||||
public const ENUM_TYPE_BUTTON = 'button';
|
||||
/** @var string ENUM_TYPE_SUBMIT */
|
||||
const ENUM_TYPE_SUBMIT = 'submit';
|
||||
public const ENUM_TYPE_SUBMIT = 'submit';
|
||||
/** @var string ENUM_TYPE_RESET */
|
||||
const ENUM_TYPE_RESET = 'reset';
|
||||
public const ENUM_TYPE_RESET = 'reset';
|
||||
/** @var string DEFAULT_TYPE */
|
||||
const DEFAULT_TYPE = self::ENUM_TYPE_BUTTON;
|
||||
public const DEFAULT_TYPE = self::ENUM_TYPE_BUTTON;
|
||||
|
||||
/** @var string ENUM_ACTION_TYPE_REGULAR */
|
||||
const ENUM_ACTION_TYPE_REGULAR = 'regular';
|
||||
public const ENUM_ACTION_TYPE_REGULAR = 'regular';
|
||||
/** @var string ENUM_ACTION_TYPE_ALTERNATIVE */
|
||||
const ENUM_ACTION_TYPE_ALTERNATIVE = 'alternative';
|
||||
public const ENUM_ACTION_TYPE_ALTERNATIVE = 'alternative';
|
||||
/** @var string DEFAULT_ACTION_TYPE */
|
||||
const DEFAULT_ACTION_TYPE = self::ENUM_ACTION_TYPE_REGULAR;
|
||||
public const DEFAULT_ACTION_TYPE = self::ENUM_ACTION_TYPE_REGULAR;
|
||||
|
||||
/** @var string ENUM_COLOR_NEUTRAL */
|
||||
const ENUM_COLOR_NEUTRAL = 'neutral';
|
||||
public const ENUM_COLOR_NEUTRAL = 'neutral';
|
||||
/** @var string ENUM_COLOR_VALIDATION */
|
||||
const ENUM_COLOR_VALIDATION = 'green';
|
||||
public const ENUM_COLOR_VALIDATION = 'green';
|
||||
/** @var string ENUM_COLOR_DESTRUCTIVE */
|
||||
const ENUM_COLOR_DESTRUCTIVE = 'red';
|
||||
public const ENUM_COLOR_DESTRUCTIVE = 'red';
|
||||
/** @var string ENUM_COLOR_PRIMARY */
|
||||
const ENUM_COLOR_PRIMARY = 'primary';
|
||||
public const ENUM_COLOR_PRIMARY = 'primary';
|
||||
/** @var string ENUM_COLOR_SECONDARY */
|
||||
const ENUM_COLOR_SECONDARY = 'secondary';
|
||||
public const ENUM_COLOR_SECONDARY = 'secondary';
|
||||
/** @var string ENUM_COLOR_GREEN */
|
||||
const ENUM_COLOR_GREEN = 'green';
|
||||
public const ENUM_COLOR_GREEN = 'green';
|
||||
/** @var string ENUM_COLOR_RED */
|
||||
const ENUM_COLOR_RED = 'red';
|
||||
public const ENUM_COLOR_RED = 'red';
|
||||
/** @var string ENUM_COLOR_CYAN */
|
||||
const ENUM_COLOR_CYAN = 'cyan';
|
||||
public const ENUM_COLOR_CYAN = 'cyan';
|
||||
/** @var string DEFAULT_COLOR */
|
||||
const DEFAULT_COLOR = self::ENUM_COLOR_NEUTRAL;
|
||||
public const DEFAULT_COLOR = self::ENUM_COLOR_NEUTRAL;
|
||||
|
||||
/** @var string $sLabel */
|
||||
protected $sLabel;
|
||||
|
||||
@@ -34,14 +34,14 @@ use utils;
|
||||
class GlobalSearch extends UIBlock
|
||||
{
|
||||
// Overloaded constants
|
||||
const BLOCK_CODE = 'ibo-global-search';
|
||||
const HTML_TEMPLATE_REL_PATH = 'components/global-search/layout';
|
||||
const JS_TEMPLATE_REL_PATH = 'components/global-search/layout';
|
||||
const JS_FILES_REL_PATH = [
|
||||
public const BLOCK_CODE = 'ibo-global-search';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'components/global-search/layout';
|
||||
public const JS_TEMPLATE_REL_PATH = 'components/global-search/layout';
|
||||
public const JS_FILES_REL_PATH = [
|
||||
'js/components/global-search.js',
|
||||
];
|
||||
|
||||
const DEFAULT_ENDPOINT_REL_URL = 'pages/UI.php?operation=full_text';
|
||||
public const DEFAULT_ENDPOINT_REL_URL = 'pages/UI.php?operation=full_text';
|
||||
|
||||
/** @var string $sEndpoint Absolute endpoint URL of the search form */
|
||||
protected $sEndpoint;
|
||||
|
||||
@@ -33,8 +33,8 @@ use utils;
|
||||
*/
|
||||
class GlobalSearchHelper
|
||||
{
|
||||
const MAX_HISTORY_SIZE = 10;
|
||||
const USER_PREF_CODE = 'global_search_history';
|
||||
public const MAX_HISTORY_SIZE = 10;
|
||||
public const USER_PREF_CODE = 'global_search_history';
|
||||
|
||||
/**
|
||||
* Add $sQuery to the history. History is limited to the static::MAX_HISTORY_SIZE last queries.
|
||||
|
||||
@@ -32,8 +32,8 @@ use Combodo\iTop\Application\UI\UIBlock;
|
||||
class Html extends UIBlock
|
||||
{
|
||||
// Overloaded constants
|
||||
const BLOCK_CODE = 'ibo-html';
|
||||
const HTML_TEMPLATE_REL_PATH = 'components/html/layout';
|
||||
public const BLOCK_CODE = 'ibo-html';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'components/html/layout';
|
||||
|
||||
/** @var string $sHtml The raw HTML, must be already sanitized */
|
||||
protected $sHtml;
|
||||
|
||||
@@ -32,48 +32,48 @@ use Combodo\iTop\Application\UI\UIBlock;
|
||||
class Panel extends UIBlock
|
||||
{
|
||||
// Overloaded constants
|
||||
const BLOCK_CODE = 'ibo-panel';
|
||||
const HTML_TEMPLATE_REL_PATH = 'components/panel/layout';
|
||||
const JS_TEMPLATE_REL_PATH = 'components/panel/layout';
|
||||
public const BLOCK_CODE = 'ibo-panel';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'components/panel/layout';
|
||||
public const JS_TEMPLATE_REL_PATH = 'components/panel/layout';
|
||||
|
||||
// Specific constants
|
||||
/** @var string ENUM_COLOR_PRIMARY */
|
||||
const ENUM_COLOR_PRIMARY = 'primary';
|
||||
public const ENUM_COLOR_PRIMARY = 'primary';
|
||||
/** @var string ENUM_COLOR_SECONDARY */
|
||||
const ENUM_COLOR_SECONDARY = 'secondary';
|
||||
public const ENUM_COLOR_SECONDARY = 'secondary';
|
||||
|
||||
/** @var string ENUM_COLOR_NEUTRAL */
|
||||
const ENUM_COLOR_NEUTRAL = 'neutral';
|
||||
public const ENUM_COLOR_NEUTRAL = 'neutral';
|
||||
/** @var string ENUM_COLOR_INFORMATION */
|
||||
const ENUM_COLOR_INFORMATION = 'information';
|
||||
public const ENUM_COLOR_INFORMATION = 'information';
|
||||
/** @var string ENUM_COLOR_SUCCESS */
|
||||
const ENUM_COLOR_SUCCESS = 'success';
|
||||
public const ENUM_COLOR_SUCCESS = 'success';
|
||||
/** @var string ENUM_COLOR_FAILURE */
|
||||
const ENUM_COLOR_FAILURE = 'failure';
|
||||
public const ENUM_COLOR_FAILURE = 'failure';
|
||||
/** @var string ENUM_COLOR_WARNING */
|
||||
const ENUM_COLOR_WARNING = 'warning';
|
||||
public const ENUM_COLOR_WARNING = 'warning';
|
||||
/** @var string ENUM_COLOR_DANGER */
|
||||
const ENUM_COLOR_DANGER = 'danger';
|
||||
public const ENUM_COLOR_DANGER = 'danger';
|
||||
|
||||
/** @var string ENUM_COLOR_GREY */
|
||||
const ENUM_COLOR_GREY = 'grey';
|
||||
public const ENUM_COLOR_GREY = 'grey';
|
||||
/** @var string ENUM_COLOR_BLUEGREY */
|
||||
const ENUM_COLOR_BLUEGREY = 'blue-grey';
|
||||
public const ENUM_COLOR_BLUEGREY = 'blue-grey';
|
||||
/** @var string ENUM_COLOR_BLUE */
|
||||
const ENUM_COLOR_BLUE = 'blue';
|
||||
public const ENUM_COLOR_BLUE = 'blue';
|
||||
/** @var string ENUM_COLOR_CYAN */
|
||||
const ENUM_COLOR_CYAN = 'cyan';
|
||||
public const ENUM_COLOR_CYAN = 'cyan';
|
||||
/** @var string ENUM_COLOR_GREEN */
|
||||
const ENUM_COLOR_GREEN = 'green';
|
||||
public const ENUM_COLOR_GREEN = 'green';
|
||||
/** @var string ENUM_COLOR_ORANGE */
|
||||
const ENUM_COLOR_ORANGE = 'orange';
|
||||
public const ENUM_COLOR_ORANGE = 'orange';
|
||||
/** @var string ENUM_COLOR_RED */
|
||||
const ENUM_COLOR_RED = 'red';
|
||||
public const ENUM_COLOR_RED = 'red';
|
||||
/** @var string ENUM_COLOR_PINK */
|
||||
const ENUM_COLOR_PINK = 'pink';
|
||||
public const ENUM_COLOR_PINK = 'pink';
|
||||
|
||||
/** @var string DEFAULT_COLOR */
|
||||
const DEFAULT_COLOR = self::ENUM_COLOR_NEUTRAL;
|
||||
public const DEFAULT_COLOR = self::ENUM_COLOR_NEUTRAL;
|
||||
|
||||
/** @var string $sTitle */
|
||||
protected $sTitle;
|
||||
|
||||
@@ -33,9 +33,9 @@ use Combodo\iTop\Application\UI\Component\PopoverMenu\PopoverMenu;
|
||||
class NewsroomMenu extends PopoverMenu
|
||||
{
|
||||
// Overloaded constants
|
||||
const HTML_TEMPLATE_REL_PATH = 'components/popover-menu/newsroom-menu/layout';
|
||||
const JS_TEMPLATE_REL_PATH = 'components/popover-menu/newsroom-menu/layout';
|
||||
const JS_FILES_REL_PATH = [
|
||||
public const HTML_TEMPLATE_REL_PATH = 'components/popover-menu/newsroom-menu/layout';
|
||||
public const JS_TEMPLATE_REL_PATH = 'components/popover-menu/newsroom-menu/layout';
|
||||
public const JS_FILES_REL_PATH = [
|
||||
'js/components/newsroom-menu.js',
|
||||
];
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@ use Exception;
|
||||
class PopoverMenu extends UIBlock
|
||||
{
|
||||
// Overloaded constants
|
||||
const BLOCK_CODE = 'ibo-popover-menu';
|
||||
const HTML_TEMPLATE_REL_PATH = 'components/popover-menu/layout';
|
||||
const JS_FILES_REL_PATH = [
|
||||
public const BLOCK_CODE = 'ibo-popover-menu';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'components/popover-menu/layout';
|
||||
public const JS_FILES_REL_PATH = [
|
||||
'js/components/popover-menu.js',
|
||||
];
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ use JSPopupMenuItem;
|
||||
class JsPopoverMenuItem extends PopoverMenuItem
|
||||
{
|
||||
// Overloaded constants
|
||||
const HTML_TEMPLATE_REL_PATH = 'components/popover-menu/item/mode_js';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'components/popover-menu/item/mode_js';
|
||||
|
||||
/**
|
||||
* @see \JSPopupMenuItem::GetJsCode()
|
||||
|
||||
@@ -34,8 +34,8 @@ use Combodo\iTop\Application\UI\UIBlock;
|
||||
class PopoverMenuItem extends UIBlock
|
||||
{
|
||||
// Overloaded constants
|
||||
const BLOCK_CODE = 'ibo-popover-menu--item';
|
||||
const HTML_TEMPLATE_REL_PATH = 'components/popover-menu/item/layout';
|
||||
public const BLOCK_CODE = 'ibo-popover-menu--item';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'components/popover-menu/item/layout';
|
||||
|
||||
/** @var \ApplicationPopupMenuItem $oPopupMenuItem We decorate the class with the original \ApplicationPopupMenuItem as it is used among the application (backoffice, portal, extensions) and cannot be refactored without BC breaks */
|
||||
protected $oPopupMenuItem;
|
||||
|
||||
@@ -30,6 +30,6 @@ namespace Combodo\iTop\Application\UI\Component\PopoverMenu\PopoverMenuItem;
|
||||
*/
|
||||
class SeparatorPopoverMenuItem extends PopoverMenuItem
|
||||
{
|
||||
const HTML_TEMPLATE_REL_PATH = 'components/popover-menu/item/mode_separator';
|
||||
|
||||
public const HTML_TEMPLATE_REL_PATH = 'components/popover-menu/item/mode_separator';
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@ namespace Combodo\iTop\Application\UI\Component\PopoverMenu\PopoverMenuItem;
|
||||
class UrlPopoverMenuItem extends PopoverMenuItem
|
||||
{
|
||||
// Overloaded constants
|
||||
const HTML_TEMPLATE_REL_PATH = 'components/popover-menu/item/mode_url';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'components/popover-menu/item/mode_url';
|
||||
|
||||
/**
|
||||
* @see \URLPopupMenuItem::GetUrl()
|
||||
|
||||
@@ -34,19 +34,19 @@ use UserRights;
|
||||
class QuickCreate extends UIBlock
|
||||
{
|
||||
// Overloaded constants
|
||||
const BLOCK_CODE = 'ibo-quick-create';
|
||||
const HTML_TEMPLATE_REL_PATH = 'components/quick-create/layout';
|
||||
const JS_TEMPLATE_REL_PATH = 'components/quick-create/layout';
|
||||
const JS_FILES_REL_PATH = [
|
||||
public const BLOCK_CODE = 'ibo-quick-create';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'components/quick-create/layout';
|
||||
public const JS_TEMPLATE_REL_PATH = 'components/quick-create/layout';
|
||||
public const JS_FILES_REL_PATH = [
|
||||
'js/selectize.min.js',
|
||||
'js/components/quick-create.js',
|
||||
];
|
||||
const CSS_FILES_REL_PATH = [
|
||||
public const CSS_FILES_REL_PATH = [
|
||||
'css/selectize.default.css',
|
||||
];
|
||||
|
||||
// Specific constants
|
||||
const DEFAULT_ENDPOINT_REL_URL = 'pages/UI.php';
|
||||
public const DEFAULT_ENDPOINT_REL_URL = 'pages/UI.php';
|
||||
|
||||
/** @var array $aAvailableClasses */
|
||||
protected $aAvailableClasses;
|
||||
|
||||
@@ -35,8 +35,8 @@ use utils;
|
||||
*/
|
||||
class QuickCreateHelper
|
||||
{
|
||||
const MAX_HISTORY_SIZE = 10;
|
||||
const USER_PREF_CODE = 'quick_create_history';
|
||||
public const MAX_HISTORY_SIZE = 10;
|
||||
public const USER_PREF_CODE = 'quick_create_history';
|
||||
|
||||
/**
|
||||
* Add $sQuery to the history. History is limited to the static::MAX_HISTORY_SIZE last classes.
|
||||
|
||||
@@ -37,16 +37,16 @@ use UserRights;
|
||||
class ActivityEntry extends UIBlock
|
||||
{
|
||||
// Overloaded constants
|
||||
const BLOCK_CODE = 'ibo-activity-entry';
|
||||
const HTML_TEMPLATE_REL_PATH = 'layouts/activity-panel/activity-entry/layout';
|
||||
public const BLOCK_CODE = 'ibo-activity-entry';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'layouts/activity-panel/activity-entry/layout';
|
||||
|
||||
// Specific constants
|
||||
/** @var string DEFAULT_ORIGIN */
|
||||
const DEFAULT_ORIGIN = 'unknown';
|
||||
public const DEFAULT_ORIGIN = 'unknown';
|
||||
/** @var string DEFAULT_TYPE */
|
||||
const DEFAULT_TYPE = 'generic';
|
||||
public const DEFAULT_TYPE = 'generic';
|
||||
/** @var string DEFAULT_DECORATION_CLASSES */
|
||||
const DEFAULT_DECORATION_CLASSES = 'fas fa-fw fa-mortar-pestle';
|
||||
public const DEFAULT_DECORATION_CLASSES = 'fas fa-fw fa-mortar-pestle';
|
||||
|
||||
/** @var string $sType Type of entry, used for filtering (eg. caselog, edits, transition, ...) */
|
||||
protected $sType;
|
||||
|
||||
@@ -28,5 +28,5 @@ namespace Combodo\iTop\Application\UI\Layout\ActivityPanel\ActivityEntry\CMDBCha
|
||||
*/
|
||||
class CMDBChangeOpAttachmentAddedFactory extends CMDBChangeOpFactory
|
||||
{
|
||||
const DEFAULT_DECORATION_CLASSES = 'fas fa-fw fa-paperclip';
|
||||
public const DEFAULT_DECORATION_CLASSES = 'fas fa-fw fa-paperclip';
|
||||
}
|
||||
@@ -30,5 +30,5 @@ use iCMDBChangeOp;
|
||||
*/
|
||||
class CMDBChangeOpAttachmentRemovedFactory extends CMDBChangeOpFactory
|
||||
{
|
||||
const DEFAULT_DECORATION_CLASSES = 'fas fa-fw fa-unlink';
|
||||
public const DEFAULT_DECORATION_CLASSES = 'fas fa-fw fa-unlink';
|
||||
}
|
||||
@@ -30,7 +30,8 @@ use iCMDBChangeOp;
|
||||
*/
|
||||
class CMDBChangeOpCreateFactory extends CMDBChangeOpFactory
|
||||
{
|
||||
const DEFAULT_DECORATION_CLASSES = 'fas fa-fw fa-unlink';
|
||||
public const DEFAULT_DECORATION_CLASSES = 'fas fa-fw fa-unlink';
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,8 @@ use iCMDBChangeOp;
|
||||
*/
|
||||
class CMDBChangeOpDeleteFactory extends CMDBChangeOpFactory
|
||||
{
|
||||
const DEFAULT_DECORATION_CLASSES = 'fas fa-fw fa-unlink';
|
||||
public const DEFAULT_DECORATION_CLASSES = 'fas fa-fw fa-unlink';
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
|
||||
@@ -37,9 +37,9 @@ use iCMDBChangeOp;
|
||||
class CMDBChangeOpFactory
|
||||
{
|
||||
/** @var string DEFAULT_TYPE Used to overload the type from the ActivityEntry */
|
||||
const DEFAULT_TYPE = EditsEntry::DEFAULT_TYPE;
|
||||
public const DEFAULT_TYPE = EditsEntry::DEFAULT_TYPE;
|
||||
/** @var string DEFAULT_DECORATION_CLASSES Used to overload the decoration classes from the ActivityEntry */
|
||||
const DEFAULT_DECORATION_CLASSES = ActivityEntry::DEFAULT_DECORATION_CLASSES;
|
||||
public const DEFAULT_DECORATION_CLASSES = ActivityEntry::DEFAULT_DECORATION_CLASSES;
|
||||
|
||||
/**
|
||||
* Make an ActivityEntry from the iCMDBChangeOp $oChangeOp
|
||||
|
||||
@@ -33,11 +33,11 @@ use DateTime;
|
||||
class CaseLogEntry extends ActivityEntry
|
||||
{
|
||||
// Overloaded constants
|
||||
const BLOCK_CODE = 'ibo-caselog-entry';
|
||||
const HTML_TEMPLATE_REL_PATH = 'layouts/activity-panel/activity-entry/caselog-entry';
|
||||
public const BLOCK_CODE = 'ibo-caselog-entry';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'layouts/activity-panel/activity-entry/caselog-entry';
|
||||
|
||||
const DEFAULT_TYPE = 'caselog';
|
||||
const DEFAULT_DECORATION_CLASSES = 'fas fa-fw fa-quote-left';
|
||||
public const DEFAULT_TYPE = 'caselog';
|
||||
public const DEFAULT_DECORATION_CLASSES = 'fas fa-fw fa-quote-left';
|
||||
|
||||
// Specific constants
|
||||
public const DEFAULT_CASELOG_RANK = 0;
|
||||
|
||||
@@ -36,11 +36,11 @@ use MetaModel;
|
||||
class EditsEntry extends ActivityEntry
|
||||
{
|
||||
// Overloaded constants
|
||||
const BLOCK_CODE = 'ibo-edits-entry';
|
||||
const HTML_TEMPLATE_REL_PATH = 'layouts/activity-panel/activity-entry/edits-entry';
|
||||
public const BLOCK_CODE = 'ibo-edits-entry';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'layouts/activity-panel/activity-entry/edits-entry';
|
||||
|
||||
const DEFAULT_TYPE = 'edits';
|
||||
const DEFAULT_DECORATION_CLASSES = 'fas fa-fw fa-pen';
|
||||
public const DEFAULT_TYPE = 'edits';
|
||||
public const DEFAULT_DECORATION_CLASSES = 'fas fa-fw fa-pen';
|
||||
|
||||
/** @var string $sObjectClass */
|
||||
protected $sObjectClass;
|
||||
|
||||
@@ -33,11 +33,11 @@ use DateTime;
|
||||
class TransitionEntry extends ActivityEntry
|
||||
{
|
||||
// Overloaded constants
|
||||
const BLOCK_CODE = 'ibo-transition-entry';
|
||||
const HTML_TEMPLATE_REL_PATH = 'layouts/activity-panel/activity-entry/transition-entry';
|
||||
public const BLOCK_CODE = 'ibo-transition-entry';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'layouts/activity-panel/activity-entry/transition-entry';
|
||||
|
||||
const DEFAULT_TYPE = 'transition';
|
||||
const DEFAULT_DECORATION_CLASSES = 'fas fa-fw fa-map-signs';
|
||||
public const DEFAULT_TYPE = 'transition';
|
||||
public const DEFAULT_DECORATION_CLASSES = 'fas fa-fw fa-map-signs';
|
||||
|
||||
/** @var string $sOriginStateCode Code of the state before the transition */
|
||||
protected $sOriginStateCode;
|
||||
|
||||
@@ -38,10 +38,10 @@ use MetaModel;
|
||||
class ActivityPanel extends UIBlock
|
||||
{
|
||||
// Overloaded constants
|
||||
const BLOCK_CODE = 'ibo-activity-panel';
|
||||
const HTML_TEMPLATE_REL_PATH = 'layouts/activity-panel/layout';
|
||||
const JS_TEMPLATE_REL_PATH = 'layouts/activity-panel/layout';
|
||||
const JS_FILES_REL_PATH = [
|
||||
public const BLOCK_CODE = 'ibo-activity-panel';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'layouts/activity-panel/layout';
|
||||
public const JS_TEMPLATE_REL_PATH = 'layouts/activity-panel/layout';
|
||||
public const JS_FILES_REL_PATH = [
|
||||
'js/layouts/activity-panel.js',
|
||||
];
|
||||
|
||||
|
||||
@@ -43,10 +43,10 @@ use utils;
|
||||
class NavigationMenu extends UIBlock
|
||||
{
|
||||
// Overloaded constants
|
||||
const BLOCK_CODE = 'ibo-navigation-menu';
|
||||
const HTML_TEMPLATE_REL_PATH = 'layouts/navigation-menu/layout';
|
||||
const JS_TEMPLATE_REL_PATH = 'layouts/navigation-menu/layout';
|
||||
const JS_FILES_REL_PATH = [
|
||||
public const BLOCK_CODE = 'ibo-navigation-menu';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'layouts/navigation-menu/layout';
|
||||
public const JS_TEMPLATE_REL_PATH = 'layouts/navigation-menu/layout';
|
||||
public const JS_FILES_REL_PATH = [
|
||||
'js/layouts/navigation-menu.js',
|
||||
];
|
||||
|
||||
|
||||
@@ -35,11 +35,11 @@ use Exception;
|
||||
class PageContent extends UIBlock
|
||||
{
|
||||
// Overloaded constants
|
||||
const BLOCK_CODE = 'ibo-page-content';
|
||||
const HTML_TEMPLATE_REL_PATH = 'layouts/page-content/layout';
|
||||
public const BLOCK_CODE = 'ibo-page-content';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'layouts/page-content/layout';
|
||||
|
||||
/** @var string ENUM_CONTENT_AREA_MAIN The main content area */
|
||||
const ENUM_CONTENT_AREA_MAIN = 'main';
|
||||
public const ENUM_CONTENT_AREA_MAIN = 'main';
|
||||
|
||||
/** @var \Combodo\iTop\Application\UI\iUIBlock[][] $aContentAreasBlocks Blocks for the different content parts of the layout */
|
||||
protected $aContentAreasBlocks;
|
||||
|
||||
@@ -33,11 +33,11 @@ use Combodo\iTop\Application\UI\iUIBlock;
|
||||
class PageContentWithSideContent extends PageContent
|
||||
{
|
||||
// Overloaded constants
|
||||
const BLOCK_CODE = 'ibo-page-content-with-side-content';
|
||||
const HTML_TEMPLATE_REL_PATH = 'layouts/page-content/with-side-content';
|
||||
public const BLOCK_CODE = 'ibo-page-content-with-side-content';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'layouts/page-content/with-side-content';
|
||||
|
||||
// Specific constants
|
||||
const ENUM_CONTENT_AREA_SIDE = 'side';
|
||||
public const ENUM_CONTENT_AREA_SIDE = 'side';
|
||||
|
||||
/**
|
||||
* PageContentWithSideContent constructor.
|
||||
|
||||
@@ -36,8 +36,8 @@ use Combodo\iTop\Application\UI\UIBlock;
|
||||
class TopBar extends UIBlock
|
||||
{
|
||||
// Overloaded constants
|
||||
const BLOCK_CODE = 'ibo-top-bar';
|
||||
const HTML_TEMPLATE_REL_PATH = 'layouts/top-bar/layout';
|
||||
public const BLOCK_CODE = 'ibo-top-bar';
|
||||
public const HTML_TEMPLATE_REL_PATH = 'layouts/top-bar/layout';
|
||||
|
||||
/** @var QuickCreate|null $oQuickCreate */
|
||||
protected $oQuickCreate;
|
||||
|
||||
@@ -33,27 +33,28 @@ abstract class UIBlock implements iUIBlock
|
||||
{
|
||||
/** @var string BLOCK_CODE The block code to use to generate the identifier, the CSS/JS prefixes, ...
|
||||
*
|
||||
* Should start "ibo-" for the iTop backoffice blocks, followed by the name of the block in lower case (eg. for a MyCustomBlock class, should be "ibo-my-custom-clock")
|
||||
* Should start "ibo-" for the iTop backoffice blocks, followed by the name of the block in lower case (eg. for a MyCustomBlock class,
|
||||
* should be "ibo-my-custom-clock")
|
||||
*/
|
||||
const BLOCK_CODE = 'ibo-block';
|
||||
public const BLOCK_CODE = 'ibo-block';
|
||||
|
||||
/** @var string|null GLOBAL_TEMPLATE_REL_PATH Relative path (from <ITOP>/templates/) to the "global" TWIG template which contains HTML, JS inline, JS files, CSS inline, CSS files. Should not be used to often as JS/CSS files would be duplicated making browser parsing time way longer. */
|
||||
const GLOBAL_TEMPLATE_REL_PATH = null;
|
||||
public const GLOBAL_TEMPLATE_REL_PATH = null;
|
||||
/** @var string|null HTML_TEMPLATE_REL_PATH Relative path (from <ITOP>/templates/) to the HTML template */
|
||||
const HTML_TEMPLATE_REL_PATH = null;
|
||||
public const HTML_TEMPLATE_REL_PATH = null;
|
||||
/** @var array JS_FILES_REL_PATH Relative paths (from <ITOP>/) to the JS files */
|
||||
const JS_FILES_REL_PATH = [];
|
||||
public const JS_FILES_REL_PATH = [];
|
||||
/** @var string|null JS_TEMPLATE_REL_PATH Relative path (from <ITOP>/templates/) to the JS template */
|
||||
const JS_TEMPLATE_REL_PATH = null;
|
||||
public const JS_TEMPLATE_REL_PATH = null;
|
||||
/** @var array CSS_FILES_REL_PATH Relative paths (from <ITOP>/) to the CSS files */
|
||||
const CSS_FILES_REL_PATH = [];
|
||||
public const CSS_FILES_REL_PATH = [];
|
||||
/** @var string|null CSS_TEMPLATE_REL_PATH Relative path (from <ITOP>/templates/) to the CSS template */
|
||||
const CSS_TEMPLATE_REL_PATH = null;
|
||||
public const CSS_TEMPLATE_REL_PATH = null;
|
||||
|
||||
/** @var string ENUM_BLOCK_FILES_TYPE_JS */
|
||||
const ENUM_BLOCK_FILES_TYPE_JS = 'js';
|
||||
public const ENUM_BLOCK_FILES_TYPE_JS = 'js';
|
||||
/** @var string ENUM_BLOCK_FILES_TYPE_CSS */
|
||||
const ENUM_BLOCK_FILES_TYPE_CSS = 'css';
|
||||
public const ENUM_BLOCK_FILES_TYPE_CSS = 'css';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user