mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Merge branch 'support/3.0' into develop
# Conflicts: # application/applicationextension.inc.php
This commit is contained in:
@@ -29,14 +29,14 @@ require_once(APPROOT.'application/newsroomprovider.class.inc.php');
|
||||
* Definition of interfaces that can be implemented to customize iTop.
|
||||
* You may implement such interfaces in a module file (e.g. main.mymodule.php)
|
||||
*
|
||||
* @api
|
||||
* @copyright Copyright (C) 2010-2021 Combodo SARL
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
* @package Extensibility
|
||||
* @since 2.7.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @package LoginExtensibilityAPI
|
||||
* @since 2.7.0
|
||||
*/
|
||||
interface iLoginExtension
|
||||
@@ -51,6 +51,8 @@ interface iLoginExtension
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @package LoginExtensibilityAPI
|
||||
* @since 2.7.0
|
||||
*/
|
||||
interface iLoginFSMExtension extends iLoginExtension
|
||||
@@ -62,6 +64,7 @@ interface iLoginFSMExtension extends iLoginExtension
|
||||
* if LoginWebPage::LOGIN_FSM_RETURN_OK is returned then the login is OK and terminated
|
||||
* if LoginWebPage::LOGIN_FSM_RETURN_IGNORE is returned then the FSM will proceed to next plugin or state
|
||||
*
|
||||
* @api
|
||||
* @param string $sLoginState (see LoginWebPage::LOGIN_STATE_...)
|
||||
* @param int $iErrorCode (see LoginWebPage::EXIT_CODE_...)
|
||||
*
|
||||
@@ -837,7 +840,7 @@ abstract class ApplicationPopupMenuItem
|
||||
/** @ignore */
|
||||
protected $sLabel;
|
||||
/** @ignore */
|
||||
protected $sTooltip;
|
||||
protected $sTooltip;
|
||||
/** @ignore */
|
||||
protected $sIconClass;
|
||||
/** @ignore */
|
||||
@@ -934,7 +937,7 @@ abstract class ApplicationPopupMenuItem
|
||||
{
|
||||
return $this->sTooltip;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $sIconClass
|
||||
*
|
||||
@@ -944,8 +947,8 @@ abstract class ApplicationPopupMenuItem
|
||||
public function SetIconClass($sIconClass)
|
||||
{
|
||||
$this->sIconClass = $sIconClass;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*
|
||||
@@ -956,7 +959,7 @@ abstract class ApplicationPopupMenuItem
|
||||
{
|
||||
return $this->sIconClass;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the components to create a popup menu item in HTML
|
||||
*
|
||||
@@ -1015,7 +1018,7 @@ class URLPopupMenuItem extends ApplicationPopupMenuItem
|
||||
'tooltip' => $this->sTooltip
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/** @ignore */
|
||||
public function GetUrl()
|
||||
{
|
||||
@@ -1084,13 +1087,13 @@ class JSPopupMenuItem extends ApplicationPopupMenuItem
|
||||
{
|
||||
return $this->aIncludeJSFiles;
|
||||
}
|
||||
|
||||
|
||||
/** @ignore */
|
||||
public function GetJsCode()
|
||||
{
|
||||
return $this->sJsCode;
|
||||
}
|
||||
|
||||
|
||||
/** @ignore */
|
||||
public function GetUrl()
|
||||
{
|
||||
@@ -1915,6 +1918,7 @@ class RestUtils
|
||||
/**
|
||||
* Read and interpret object search criteria from a Rest/Json structure
|
||||
*
|
||||
* @api
|
||||
* @param string $sClass Name of the class
|
||||
* @param StdClass $oCriteria Hash of attribute code => value (can be a substructure or a scalar, depending on the nature of the
|
||||
* attriute)
|
||||
@@ -2023,6 +2027,7 @@ class RestUtils
|
||||
/**
|
||||
* Search objects from a polymorph search specification (Rest/Json)
|
||||
*
|
||||
* @api
|
||||
* @param string $sClass Name of the class
|
||||
* @param mixed $key Either search criteria (substructure), or an object or an OQL string.
|
||||
* @param int $iLimit The limit of results to return
|
||||
|
||||
@@ -30,18 +30,40 @@
|
||||
/**
|
||||
* Element of the response formed by RestResultWithObjects
|
||||
*
|
||||
* @package REST Services
|
||||
* @package RESTExtensibilityAPI
|
||||
* @api
|
||||
*/
|
||||
class ObjectResult
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
* @api
|
||||
*/
|
||||
public $code;
|
||||
/**
|
||||
* @var string
|
||||
* @api
|
||||
*/
|
||||
public $message;
|
||||
/**
|
||||
* @var mixed|null
|
||||
* @api
|
||||
*/
|
||||
public $class;
|
||||
/**
|
||||
* @var mixed|null
|
||||
* @api
|
||||
*/
|
||||
public $key;
|
||||
/**
|
||||
* @var array
|
||||
* @api
|
||||
*/
|
||||
public $fields;
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
* @api
|
||||
*/
|
||||
public function __construct($sClass = null, $iId = null)
|
||||
{
|
||||
@@ -54,11 +76,17 @@ class ObjectResult
|
||||
|
||||
/**
|
||||
* Helper to make an output value for a given attribute
|
||||
*
|
||||
*
|
||||
* @api
|
||||
* @param DBObject $oObject The object being reported
|
||||
* @param string $sAttCode The attribute code (must be valid)
|
||||
* @param boolean $bExtendedOutput Output all of the link set attributes ?
|
||||
*
|
||||
* @return string A scalar representation of the value
|
||||
* @throws \ArchivedObjectException
|
||||
* @throws \CoreException
|
||||
* @throws \CoreUnexpectedValue
|
||||
* @throws \MySQLException
|
||||
*/
|
||||
protected function MakeResultValue(DBObject $oObject, $sAttCode, $bExtendedOutput = false)
|
||||
{
|
||||
@@ -112,11 +140,17 @@ class ObjectResult
|
||||
|
||||
/**
|
||||
* Report the value for the given object attribute
|
||||
*
|
||||
*
|
||||
* @api
|
||||
* @param DBObject $oObject The object being reported
|
||||
* @param string $sAttCode The attribute code (must be valid)
|
||||
* @param boolean $bExtendedOutput Output all of the link set attributes ?
|
||||
*
|
||||
* @return void
|
||||
* @throws \ArchivedObjectException
|
||||
* @throws \CoreException
|
||||
* @throws \CoreUnexpectedValue
|
||||
* @throws \MySQLException
|
||||
*/
|
||||
public function AddField(DBObject $oObject, $sAttCode, $bExtendedOutput = false)
|
||||
{
|
||||
@@ -129,8 +163,7 @@ class ObjectResult
|
||||
/**
|
||||
* REST response for services managing objects. Derive this structure to add information and/or constants
|
||||
*
|
||||
* @package Extensibility
|
||||
* @package REST Services
|
||||
* @package RESTExtensibilityAPI
|
||||
* @api
|
||||
*/
|
||||
class RestResultWithObjects extends RestResult
|
||||
@@ -140,13 +173,19 @@ class RestResultWithObjects extends RestResult
|
||||
|
||||
/**
|
||||
* Report the given object
|
||||
*
|
||||
* @param int An error code (RestResult::OK is no issue has been found)
|
||||
*
|
||||
* @api
|
||||
* @param $iCode
|
||||
* @param string $sMessage Description of the error if any, an empty string otherwise
|
||||
* @param DBObject $oObject The object being reported
|
||||
* @param array $aFieldSpec An array of class => attribute codes (Cf. RestUtils::GetFieldList). List of the attributes to be reported.
|
||||
* @param null $aFieldSpec An array of class => attribute codes (Cf. RestUtils::GetFieldList). List of the attributes to be reported.
|
||||
* @param boolean $bExtendedOutput Output all of the link set attributes ?
|
||||
*
|
||||
* @return void
|
||||
* @throws \ArchivedObjectException
|
||||
* @throws \CoreException
|
||||
* @throws \CoreUnexpectedValue
|
||||
* @throws \MySQLException
|
||||
*/
|
||||
public function AddObject($iCode, $sMessage, $oObject, $aFieldSpec = null, $bExtendedOutput = false)
|
||||
{
|
||||
@@ -184,16 +223,30 @@ class RestResultWithObjects extends RestResult
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @package RESTExtensibilityAPI
|
||||
* @api
|
||||
*/
|
||||
class RestResultWithRelations extends RestResultWithObjects
|
||||
{
|
||||
public $relations;
|
||||
|
||||
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->relations = array();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $sSrcKey
|
||||
* @param $sDestKey
|
||||
*
|
||||
* @return void
|
||||
* @api
|
||||
*/
|
||||
public function AddRelation($sSrcKey, $sDestKey)
|
||||
{
|
||||
if (!array_key_exists($sSrcKey, $this->relations))
|
||||
@@ -207,7 +260,7 @@ class RestResultWithRelations extends RestResultWithObjects
|
||||
/**
|
||||
* Deletion result codes for a target object (either deleted or updated)
|
||||
*
|
||||
* @package Extensibility
|
||||
* @package RESTExtensibilityAPI
|
||||
* @api
|
||||
* @since 2.0.1
|
||||
*/
|
||||
@@ -215,30 +268,37 @@ class RestDelete
|
||||
{
|
||||
/**
|
||||
* Result: Object deleted as per the initial request
|
||||
* @api
|
||||
*/
|
||||
const OK = 0;
|
||||
/**
|
||||
* Result: general issue (user rights or ... ?)
|
||||
* Result: general issue (user rights or ... ?)
|
||||
* @api
|
||||
*/
|
||||
const ISSUE = 1;
|
||||
/**
|
||||
* Result: Must be deleted to preserve database integrity
|
||||
* Result: Must be deleted to preserve database integrity
|
||||
* @api
|
||||
*/
|
||||
const AUTO_DELETE = 2;
|
||||
/**
|
||||
* Result: Must be deleted to preserve database integrity, but that is NOT possible
|
||||
* Result: Must be deleted to preserve database integrity, but that is NOT possible
|
||||
* @api
|
||||
*/
|
||||
const AUTO_DELETE_ISSUE = 3;
|
||||
/**
|
||||
* Result: Must be deleted to preserve database integrity, but this must be requested explicitely
|
||||
* Result: Must be deleted to preserve database integrity, but this must be requested explicitly
|
||||
* @api
|
||||
*/
|
||||
const REQUEST_EXPLICITELY = 4;
|
||||
/**
|
||||
* Result: Must be updated to preserve database integrity
|
||||
* @api
|
||||
*/
|
||||
const AUTO_UPDATE = 5;
|
||||
/**
|
||||
* Result: Must be updated to preserve database integrity, but that is NOT possible
|
||||
* @api
|
||||
*/
|
||||
const AUTO_UPDATE_ISSUE = 6;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Combodo\iTop\Application\UI\Base;
|
||||
/**
|
||||
* Class AbstractUIBlockFactory
|
||||
*
|
||||
* @package Combodo\iTop\Application\UI\Base
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @author Eric Espie <eric.espie@combodo.com>
|
||||
* @since 3.0.0
|
||||
* @api
|
||||
@@ -19,11 +19,13 @@ namespace Combodo\iTop\Application\UI\Base;
|
||||
abstract class AbstractUIBlockFactory implements iUIBlockFactory
|
||||
{
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
* @see static::GetTwigTagName()
|
||||
*/
|
||||
public const TWIG_TAG_NAME = 'UIBlock';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
* @see static::GetUIBlockClassName()
|
||||
*/
|
||||
|
||||
@@ -25,7 +25,7 @@ use Combodo\iTop\Application\UI\Base\AbstractUIBlockFactory;
|
||||
* Class AlertUIBlockFactory
|
||||
*
|
||||
* @author Guillaume Lajarige <guillaume.lajarige@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\Alert
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @since 3.0.0
|
||||
* @api
|
||||
*
|
||||
@@ -41,6 +41,7 @@ class AlertUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make a basis Alert component
|
||||
*
|
||||
* @api
|
||||
* @param string $sTitle Title of the alert
|
||||
* @param string $sContent The raw HTML content, must be already sanitized
|
||||
* @param string|null $sId id of the html block
|
||||
@@ -55,6 +56,7 @@ class AlertUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make an Alert component for informational messages
|
||||
*
|
||||
* @api
|
||||
* @param string $sTitle Title of the alert
|
||||
* @param string $sContent The raw HTML content, must be already sanitized
|
||||
* @param string|null $sId id of the html block
|
||||
@@ -70,6 +72,7 @@ class AlertUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make an Alert component for successful messages
|
||||
*
|
||||
* @api
|
||||
* @param string $sTitle Title of the alert
|
||||
* @param string $sContent The raw HTML content, must be already sanitized
|
||||
* @param string|null $sId
|
||||
@@ -84,6 +87,7 @@ class AlertUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make an Alert component for warning messages
|
||||
*
|
||||
* @api
|
||||
* @param string $sTitle Title of the alert
|
||||
* @param string $sContent The raw HTML content, must be already sanitized
|
||||
* @param string|null $sId id of the html block
|
||||
@@ -98,6 +102,7 @@ class AlertUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make an Alert component for danger messages
|
||||
*
|
||||
* @api
|
||||
* @param string $sTitle Title of the alert
|
||||
* @param string $sContent The raw HTML content, must be already sanitized
|
||||
* @param string|null $sId id of the html block
|
||||
@@ -112,6 +117,7 @@ class AlertUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make an Alert component for failure messages
|
||||
*
|
||||
* @api
|
||||
* @param string $sTitle Title of the alert
|
||||
* @param string $sContent The raw HTML content, must be already sanitized
|
||||
* @param string|null $sId id of the html block
|
||||
@@ -126,6 +132,7 @@ class AlertUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make an Alert component with primary color scheme
|
||||
*
|
||||
* @api
|
||||
* @param string $sTitle Title of the alert
|
||||
* @param string $sContent The raw HTML content, must be already sanitized
|
||||
* @param string|null $sId id of the html block
|
||||
@@ -140,6 +147,7 @@ class AlertUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make an Alert component with secondary color scheme
|
||||
*
|
||||
* @api
|
||||
* @param string $sTitle Title of the alert
|
||||
* @param string $sContent The raw HTML content, must be already sanitized
|
||||
* @param string|null $sId id of the html block
|
||||
|
||||
@@ -27,9 +27,9 @@ use utils;
|
||||
* Class ButtonUIBlockFactory
|
||||
*
|
||||
* @author Guillaume Lajarige <guillaume.lajarige@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\Button
|
||||
* @since 3.0.0
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @api
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @link <itop_url>/test/VisualTest/Backoffice/RenderAllUiBlocks.php#title-buttons to see live examples
|
||||
*/
|
||||
@@ -47,6 +47,7 @@ class ButtonUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make a basis Button component for any purpose
|
||||
*
|
||||
* @api
|
||||
* @param string $sLabel
|
||||
* @param string|null $sName See {@link Button::$sName}
|
||||
* @param string|null $sId
|
||||
|
||||
@@ -15,9 +15,9 @@ use Combodo\iTop\Application\UI\Base\Component\PopoverMenu\PopoverMenu;
|
||||
* Class ButtonGroupUIBlockFactory
|
||||
*
|
||||
* @author Guillaume Lajarige <guillaume.lajarige@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\Button
|
||||
* @since 3.0.0
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @api
|
||||
* @since 3.0.0
|
||||
*/
|
||||
class ButtonGroupUIBlockFactory extends AbstractUIBlockFactory
|
||||
{
|
||||
@@ -29,6 +29,7 @@ class ButtonGroupUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make a button that has a primary action ($oButton) but also an options menu ($oMenu) on the side
|
||||
*
|
||||
* @api
|
||||
* @param \Combodo\iTop\Application\UI\Base\Component\Button\Button $oButton
|
||||
* @param \Combodo\iTop\Application\UI\Base\Component\PopoverMenu\PopoverMenu $oMenu
|
||||
*
|
||||
|
||||
@@ -14,9 +14,9 @@ use Combodo\iTop\Application\UI\Base\AbstractUIBlockFactory;
|
||||
* Class CollapsibleSectionUIBlockFactory
|
||||
*
|
||||
* @author Pierre Goiffon <pierre.goiffon@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\CollapsibleSection
|
||||
* @since 3.0.0
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @api
|
||||
* @since 3.0.0
|
||||
*/
|
||||
class CollapsibleSectionUIBlockFactory extends AbstractUIBlockFactory
|
||||
{
|
||||
@@ -26,6 +26,7 @@ class CollapsibleSectionUIBlockFactory extends AbstractUIBlockFactory
|
||||
public const UI_BLOCK_CLASS_NAME = CollapsibleSection::class;
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string $sTitle
|
||||
* @param string|null $sId
|
||||
*
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
namespace Combodo\iTop\Application\UI\Base\Component\DataTable;
|
||||
|
||||
use ApplicationException;
|
||||
use ApplicationContext;
|
||||
use ApplicationException;
|
||||
use appUserPreferences;
|
||||
use AttributeLinkedSet;
|
||||
use cmdbAbstractObject;
|
||||
@@ -38,9 +38,9 @@ use WebPage;
|
||||
* Class DataTableUIBlockFactory
|
||||
*
|
||||
* @author Anne-Catherine Cognet <anne-catherine.cognet@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\DataTable
|
||||
* @since 3.0.0
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @api
|
||||
* @since 3.0.0
|
||||
*/
|
||||
class DataTableUIBlockFactory extends AbstractUIBlockFactory
|
||||
{
|
||||
@@ -50,6 +50,7 @@ class DataTableUIBlockFactory extends AbstractUIBlockFactory
|
||||
public const UI_BLOCK_CLASS_NAME = DataTable::class;
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param \WebPage $oPage
|
||||
* @param string $sListId
|
||||
* @param \DBObjectSet $oSet
|
||||
@@ -74,6 +75,7 @@ class DataTableUIBlockFactory extends AbstractUIBlockFactory
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param \WebPage $oPage
|
||||
* @param string $sListId
|
||||
* @param DBObjectSet $oSet
|
||||
@@ -225,6 +227,7 @@ class DataTableUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make a basis Panel component
|
||||
*
|
||||
* @api
|
||||
* @param string $sListId
|
||||
* @param \DBObjectSet $oSet
|
||||
* @param array $aExtraParams
|
||||
@@ -525,6 +528,7 @@ class DataTableUIBlockFactory extends AbstractUIBlockFactory
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string $sListId
|
||||
* @param DBObjectSet $oSet
|
||||
* @param array $aExtraParams
|
||||
@@ -773,7 +777,9 @@ class DataTableUIBlockFactory extends AbstractUIBlockFactory
|
||||
* @param string $sSelectMode
|
||||
* @param string $sFilter
|
||||
* @param int $iLength
|
||||
* @param array $aClassAliases
|
||||
* @param array $aExtraParams
|
||||
* @param string $sTableId
|
||||
*
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
@@ -953,6 +959,7 @@ JS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string $sTitle
|
||||
* @param array $aColumns
|
||||
* @param array $aData
|
||||
@@ -996,6 +1003,7 @@ JS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string $sRef
|
||||
* @param array $aColumns
|
||||
* @param array $aData
|
||||
|
||||
@@ -16,9 +16,10 @@ use Combodo\iTop\Application\UI\Base\UIBlock;
|
||||
*
|
||||
* Use it to make a "field" which is composed of a label and a value (which can be read-only or editable)
|
||||
*
|
||||
* @api
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @author Pierre Goiffon <pierre.goiffon@combodo.com>
|
||||
* @since 3.0.0
|
||||
* @internal
|
||||
*/
|
||||
class FieldUIBlockFactory extends AbstractUIBlockFactory
|
||||
{
|
||||
@@ -27,6 +28,12 @@ class FieldUIBlockFactory extends AbstractUIBlockFactory
|
||||
/** @inheritDoc */
|
||||
public const UI_BLOCK_CLASS_NAME = Field::class;
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param $aParams
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Field\Field
|
||||
*/
|
||||
public static function MakeFromParams($aParams)
|
||||
{
|
||||
$oValue = new Html($aParams['value']);
|
||||
@@ -75,6 +82,14 @@ class FieldUIBlockFactory extends AbstractUIBlockFactory
|
||||
$oField->$sMethodName((($iParamsFlags & $iConstant) === $iConstant));
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string $sLabel
|
||||
* @param \Combodo\iTop\Application\UI\Base\UIBlock $oInput
|
||||
* @param string|null $sLayout
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Field\Field
|
||||
*/
|
||||
public static function MakeFromObject(string $sLabel, UIBlock $oInput, ?string $sLayout = null)
|
||||
{
|
||||
$oField = new Field($sLabel, $oInput);
|
||||
@@ -86,6 +101,13 @@ class FieldUIBlockFactory extends AbstractUIBlockFactory
|
||||
return $oField;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string $sLabel
|
||||
* @param string $sValueHtml
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Field\Field
|
||||
*/
|
||||
public static function MakeLarge(string $sLabel, string $sValueHtml = '')
|
||||
{
|
||||
$oField = new Field($sLabel, new Html($sValueHtml));
|
||||
@@ -93,6 +115,13 @@ class FieldUIBlockFactory extends AbstractUIBlockFactory
|
||||
return $oField;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string $sLabel
|
||||
* @param string $sValueHtml
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Field\Field
|
||||
*/
|
||||
public static function MakeSmall(string $sLabel, string $sValueHtml = '')
|
||||
{
|
||||
$oField = new Field($sLabel, new Html($sValueHtml));
|
||||
@@ -100,6 +129,14 @@ class FieldUIBlockFactory extends AbstractUIBlockFactory
|
||||
return $oField;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string $sLabel
|
||||
* @param string $sLayout
|
||||
* @param string|null $sId
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Field\Field
|
||||
*/
|
||||
public static function MakeStandard(string $sLabel = '', string $sLayout = Field::ENUM_FIELD_LAYOUT_SMALL, ?string $sId = null)
|
||||
{
|
||||
$oField = new Field($sLabel, null, $sId);
|
||||
|
||||
@@ -16,7 +16,7 @@ use utils;
|
||||
* Class FieldBadgeUIBlockFactory
|
||||
*
|
||||
* @author Eric espie <eric.espie@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\FieldBadge
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @since 3.0.0
|
||||
* @internal
|
||||
*/
|
||||
|
||||
@@ -14,9 +14,9 @@ use Combodo\iTop\Application\UI\Base\AbstractUIBlockFactory;
|
||||
* Class FieldSetUIBlockFactory
|
||||
*
|
||||
* @author eric Espie <eric.espie@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\FieldSet
|
||||
* @since 3.0.0
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @api
|
||||
* @since 3.0.0
|
||||
*/
|
||||
class FieldSetUIBlockFactory extends AbstractUIBlockFactory
|
||||
{
|
||||
@@ -26,6 +26,7 @@ class FieldSetUIBlockFactory extends AbstractUIBlockFactory
|
||||
public const UI_BLOCK_CLASS_NAME = FieldSet::class;
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string $sLegend
|
||||
* @param string|null $sId
|
||||
*
|
||||
|
||||
@@ -14,7 +14,7 @@ use Combodo\iTop\Application\UI\Base\AbstractUIBlockFactory;
|
||||
* Class FormUIBlockFactory
|
||||
*
|
||||
* @author Eric Espie <eric.espie@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\Form
|
||||
* @package UUIBlockExtensibilityAPI
|
||||
* @since 3.0.0
|
||||
* @api
|
||||
*/
|
||||
@@ -26,6 +26,7 @@ class FormUIBlockFactory extends AbstractUIBlockFactory
|
||||
public const UI_BLOCK_CLASS_NAME = Form::class;
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string|null $sId
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Form\Form An HTML form in which you can add UIBlocks
|
||||
|
||||
@@ -14,9 +14,9 @@ use Combodo\iTop\Application\UI\Base\AbstractUIBlockFactory;
|
||||
* Class FileSelectUIBlockFactory
|
||||
*
|
||||
* @author Eric Espie <eric.espie@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\Input\FileSelect
|
||||
* @since 3.0.0
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @api
|
||||
* @since 3.0.0
|
||||
*/
|
||||
class FileSelectUIBlockFactory extends AbstractUIBlockFactory
|
||||
{
|
||||
@@ -26,6 +26,7 @@ class FileSelectUIBlockFactory extends AbstractUIBlockFactory
|
||||
public const UI_BLOCK_CLASS_NAME = FileSelect::class;
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string $sName
|
||||
* @param string|null $sId
|
||||
*
|
||||
|
||||
@@ -15,9 +15,9 @@ use Combodo\iTop\Application\UI\Base\Component\Field\Field;
|
||||
* Class InputUIBlockFactory
|
||||
*
|
||||
* @author Eric Espie <eric.espie@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\Input
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @api
|
||||
* @since 3.0.0
|
||||
* @internal
|
||||
*/
|
||||
class InputUIBlockFactory extends AbstractUIBlockFactory
|
||||
{
|
||||
@@ -26,6 +26,14 @@ class InputUIBlockFactory extends AbstractUIBlockFactory
|
||||
/** @inheritDoc */
|
||||
public const UI_BLOCK_CLASS_NAME = Input::class;
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string $sName
|
||||
* @param string $sValue
|
||||
* @param string|null $sId
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Input\Input
|
||||
*/
|
||||
public static function MakeForHidden(string $sName, string $sValue, ?string $sId = null)
|
||||
{
|
||||
$oInput = new Input($sId);
|
||||
@@ -37,6 +45,15 @@ class InputUIBlockFactory extends AbstractUIBlockFactory
|
||||
return $oInput;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string $sType
|
||||
* @param string $sName
|
||||
* @param string $sValue
|
||||
* @param string|null $sId
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Input\Input
|
||||
*/
|
||||
public static function MakeStandard(string $sType, string $sName, string $sValue, ?string $sId = null)
|
||||
{
|
||||
$oInput = new Input($sId);
|
||||
@@ -49,6 +66,7 @@ class InputUIBlockFactory extends AbstractUIBlockFactory
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @see Field component that is better adapter when dealing with a standard iTop form
|
||||
*
|
||||
* @param string $sLabel
|
||||
@@ -71,6 +89,15 @@ class InputUIBlockFactory extends AbstractUIBlockFactory
|
||||
return static::MakeInputWithLabel($sInputName, $sLabel, $oInput, $sInputId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string $sName
|
||||
* @param string $sLabel
|
||||
* @param \Combodo\iTop\Application\UI\Base\Component\Input\Input $oInput
|
||||
* @param string|null $sId
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Input\InputWithLabel
|
||||
*/
|
||||
private static function MakeInputWithLabel(string $sName, string $sLabel, Input $oInput, ?string $sId = null)
|
||||
{
|
||||
$oInput->SetName($sName);
|
||||
|
||||
@@ -14,9 +14,9 @@ use Combodo\iTop\Application\UI\Base\AbstractUIBlockFactory;
|
||||
* Class SelectOptionUIBlockFactory
|
||||
*
|
||||
* @author Eric Espie <eric.espie@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\Input\Select
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @api
|
||||
* @since 3.0.0
|
||||
* @internal
|
||||
*/
|
||||
class SelectOptionUIBlockFactory extends AbstractUIBlockFactory
|
||||
{
|
||||
@@ -25,6 +25,15 @@ class SelectOptionUIBlockFactory extends AbstractUIBlockFactory
|
||||
/** @inheritDoc */
|
||||
public const UI_BLOCK_CLASS_NAME = SelectOption::class;
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string $sValue
|
||||
* @param string $sLabel
|
||||
* @param bool $bSelected
|
||||
* @param string|null $sId
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Input\Select\SelectOption
|
||||
*/
|
||||
public static function MakeForSelectOption(string $sValue, string $sLabel, bool $bSelected, ?string $sId = null)
|
||||
{
|
||||
$oInput = new SelectOption($sId);
|
||||
|
||||
@@ -15,9 +15,9 @@ use Combodo\iTop\Application\UI\Base\Component\Input\Select\Select;
|
||||
* Class SelectUIBlockFactory
|
||||
*
|
||||
* @author Eric Espie <eric.espie@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\Input
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @api
|
||||
* @since 3.0.0
|
||||
* @internal
|
||||
*/
|
||||
class SelectUIBlockFactory extends AbstractUIBlockFactory
|
||||
{
|
||||
@@ -29,6 +29,7 @@ class SelectUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Create a default Select input
|
||||
*
|
||||
* @api
|
||||
* @param string $sName {@see Select::$sName}
|
||||
* @param string|null $sId {@see UIBlock::$sId}
|
||||
*
|
||||
@@ -47,6 +48,7 @@ class SelectUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* If you need to have a real field with a label, you might use a {@link Field} component instead
|
||||
*
|
||||
* @api
|
||||
* @param string $sName {@see Select::$sName}
|
||||
* @param string $sLabel {@see Select::$sLabel}
|
||||
* @param string|null $sId {@see UIBlock::$sId}
|
||||
|
||||
@@ -25,9 +25,9 @@ use Combodo\iTop\Application\UI\Base\AbstractUIBlockFactory;
|
||||
* Class PanelUIBlockFactory
|
||||
*
|
||||
* @author Guillaume Lajarige <guillaume.lajarige@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\Panel
|
||||
* @since 3.0.0
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @api
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @link <itop_url>/test/VisualTest/Backoffice/RenderAllUiBlocks.php#title-panels to see live examples
|
||||
*/
|
||||
@@ -41,6 +41,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make a basis Panel component
|
||||
*
|
||||
* @api
|
||||
* @param string $sTitle
|
||||
* @param string|null $sSubTitle
|
||||
*
|
||||
@@ -60,6 +61,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make a Panel component for informational messages
|
||||
*
|
||||
* @api
|
||||
* @param string $sTitle
|
||||
* @param string|null $sSubTitle
|
||||
*
|
||||
@@ -79,6 +81,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make a Panel component for successful messages
|
||||
*
|
||||
* @api
|
||||
* @param string $sTitle
|
||||
* @param string|null $sSubTitle
|
||||
*
|
||||
@@ -98,6 +101,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make a Panel component for warning messages
|
||||
*
|
||||
* @api
|
||||
* @param string $sTitle
|
||||
* @param string|null $sSubTitle
|
||||
*
|
||||
@@ -117,6 +121,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make a Panel component for danger messages
|
||||
*
|
||||
* @api
|
||||
* @param string $sTitle
|
||||
* @param string|null $sSubTitle
|
||||
*
|
||||
@@ -136,6 +141,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make a Panel component for failure messages
|
||||
*
|
||||
* @api
|
||||
* @param string $sTitle
|
||||
* @param string|null $sSubTitle
|
||||
*
|
||||
@@ -155,6 +161,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make a Panel component with primary color scheme
|
||||
*
|
||||
* @api
|
||||
* @param string $sTitle
|
||||
* @param string|null $sSubTitle
|
||||
*
|
||||
@@ -174,6 +181,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make a Panel component with secondary color scheme
|
||||
*
|
||||
* @api
|
||||
* @param string $sTitle
|
||||
* @param string|null $sSubTitle
|
||||
*
|
||||
@@ -193,6 +201,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make a Panel component with the specific $sClass color scheme
|
||||
*
|
||||
* @api
|
||||
* @param string $sClass Class of the object the panel is for
|
||||
* @param string $sTitle
|
||||
* @param string|null $sSubTitle
|
||||
|
||||
@@ -14,9 +14,9 @@ use Combodo\iTop\Application\UI\Base\AbstractUIBlockFactory;
|
||||
* Class SpinnerUIBlockFactory
|
||||
*
|
||||
* @author Eric Espie <eric.espie@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\Spinner
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @api
|
||||
* @since 3.0.0
|
||||
* @internal
|
||||
*/
|
||||
class SpinnerUIBlockFactory extends AbstractUIBlockFactory
|
||||
{
|
||||
@@ -25,6 +25,12 @@ class SpinnerUIBlockFactory extends AbstractUIBlockFactory
|
||||
/** @inheritDoc */
|
||||
public const UI_BLOCK_CLASS_NAME = Spinner::class;
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string|null $sId
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Spinner\Spinner
|
||||
*/
|
||||
public static function MakeStandard(?string $sId = null)
|
||||
{
|
||||
return new Spinner($sId);
|
||||
|
||||
@@ -16,9 +16,9 @@ use Combodo\iTop\Application\UI\Base\UIBlock;
|
||||
* Class TitleUIBlockFactory
|
||||
*
|
||||
* @author Eric Espie <eric.espie@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\Title
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @api
|
||||
* @since 3.0.0
|
||||
* @internal
|
||||
*/
|
||||
class TitleUIBlockFactory extends AbstractUIBlockFactory
|
||||
{
|
||||
@@ -27,11 +27,28 @@ class TitleUIBlockFactory extends AbstractUIBlockFactory
|
||||
/** @inheritDoc */
|
||||
public const UI_BLOCK_CLASS_NAME = Title::class;
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string $sTitle
|
||||
* @param string|null $sId
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Title\Title
|
||||
*/
|
||||
public static function MakeForPage(string $sTitle, ?string $sId = null)
|
||||
{
|
||||
return new Title(new Text($sTitle), 1, $sId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string $sTitle
|
||||
* @param string $sIconUrl
|
||||
* @param string $sIconCoverMethod
|
||||
* @param bool $bIsMedallion
|
||||
* @param string|null $sId
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Title\Title
|
||||
*/
|
||||
public static function MakeForPageWithIcon(
|
||||
string $sTitle, string $sIconUrl, string $sIconCoverMethod = Title::DEFAULT_ICON_COVER_METHOD, bool $bIsMedallion = true,
|
||||
?string $sId = null
|
||||
@@ -43,11 +60,27 @@ class TitleUIBlockFactory extends AbstractUIBlockFactory
|
||||
return $oTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string $sTitle
|
||||
* @param int $iLevel
|
||||
* @param string|null $sId
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Title\Title
|
||||
*/
|
||||
public static function MakeNeutral(string $sTitle, int $iLevel = 1, ?string $sId = null)
|
||||
{
|
||||
return new Title(new Text($sTitle), $iLevel, $sId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param \Combodo\iTop\Application\UI\Base\UIBlock $oTitle
|
||||
* @param int $iLevel
|
||||
* @param string|null $sId
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Title\Title
|
||||
*/
|
||||
public static function MakeStandard(UIBlock $oTitle, int $iLevel = 1, ?string $sId = null)
|
||||
{
|
||||
return new Title($oTitle, $iLevel, $sId);
|
||||
|
||||
@@ -14,9 +14,9 @@ use Combodo\iTop\Application\UI\Base\AbstractUIBlockFactory;
|
||||
* Class ToolbarSeparatorUIBlockFactory
|
||||
*
|
||||
* @author Guillaume Lajarige <guillaume.lajarige@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\Toolbar\Separator
|
||||
* @since 3.0.0
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @api
|
||||
* @since 3.0.0
|
||||
*/
|
||||
class ToolbarSeparatorUIBlockFactory extends AbstractUIBlockFactory
|
||||
{
|
||||
@@ -26,6 +26,7 @@ class ToolbarSeparatorUIBlockFactory extends AbstractUIBlockFactory
|
||||
public const UI_BLOCK_CLASS_NAME = Toolbar::class;
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string|null $sId
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Toolbar\Separator\VerticalSeparator
|
||||
|
||||
@@ -14,9 +14,9 @@ use Combodo\iTop\Application\UI\Base\AbstractUIBlockFactory;
|
||||
* Class ToolbarSpacerUIBlockFactory
|
||||
*
|
||||
* @author Eric Espie <eric.espie@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\Toolbar\ToolbarSpacer
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @api
|
||||
* @since 3.0.0
|
||||
* @internal
|
||||
*/
|
||||
class ToolbarSpacerUIBlockFactory extends AbstractUIBlockFactory
|
||||
{
|
||||
@@ -26,6 +26,7 @@ class ToolbarSpacerUIBlockFactory extends AbstractUIBlockFactory
|
||||
public const UI_BLOCK_CLASS_NAME = ToolbarSpacer::class;
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string|null $sId
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Toolbar\ToolbarSpacer\ToolbarSpacer
|
||||
|
||||
@@ -14,9 +14,9 @@ use Combodo\iTop\Application\UI\Base\AbstractUIBlockFactory;
|
||||
* Class ToolbarUIBlockFactory
|
||||
*
|
||||
* @author Eric Espie <eric.espie@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\Toolbar
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @api
|
||||
* @since 3.0.0
|
||||
* @internal
|
||||
*/
|
||||
class ToolbarUIBlockFactory extends AbstractUIBlockFactory
|
||||
{
|
||||
@@ -25,16 +25,36 @@ class ToolbarUIBlockFactory extends AbstractUIBlockFactory
|
||||
/** @inheritDoc */
|
||||
public const UI_BLOCK_CLASS_NAME = Toolbar::class;
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string|null $sId
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Toolbar\Toolbar
|
||||
*/
|
||||
public static function MakeForAction(string $sId = null)
|
||||
{
|
||||
return new Toolbar($sId, ['ibo-toolbar--action']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string|null $sId
|
||||
* @param array $aContainerClasses
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Toolbar\Toolbar
|
||||
*/
|
||||
public static function MakeStandard(string $sId = null, array $aContainerClasses = [])
|
||||
{
|
||||
return new Toolbar($sId, $aContainerClasses);
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string|null $sId
|
||||
* @param array $aContainerClasses
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Toolbar\Toolbar
|
||||
*/
|
||||
public static function MakeForButton(string $sId = null, array $aContainerClasses = [])
|
||||
{
|
||||
return new Toolbar($sId, array_merge($aContainerClasses, ['ibo-toolbar--button']));
|
||||
|
||||
@@ -15,7 +15,7 @@ use Combodo\iTop\Application\UI\Base\UIBlock;
|
||||
* Class ColumnUIBlockFactory
|
||||
*
|
||||
* @author Eric Espie <eric.espie@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Layout\MultiColumn\Column
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @since 3.0.0
|
||||
* @api
|
||||
*/
|
||||
@@ -26,6 +26,12 @@ class ColumnUIBlockFactory extends AbstractUIBlockFactory
|
||||
/** @inheritDoc */
|
||||
public const UI_BLOCK_CLASS_NAME = Column::class;
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string|null $sId
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Layout\MultiColumn\Column\Column
|
||||
*/
|
||||
public static function MakeStandard(?string $sId = null)
|
||||
{
|
||||
$oInput = new Column($sId);
|
||||
@@ -33,6 +39,13 @@ class ColumnUIBlockFactory extends AbstractUIBlockFactory
|
||||
return $oInput;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param \Combodo\iTop\Application\UI\Base\UIBlock $oBlock
|
||||
* @param string|null $sId
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Layout\MultiColumn\Column\Column
|
||||
*/
|
||||
public static function MakeForBlock(UIBlock $oBlock, ?string $sId = null)
|
||||
{
|
||||
$oInput = new Column($sId);
|
||||
|
||||
@@ -13,7 +13,7 @@ use Combodo\iTop\Application\UI\Base\AbstractUIBlockFactory;
|
||||
* Class MultiColumnUIBlockFactory
|
||||
*
|
||||
* @author Eric Espie <eric.espie@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Layout\MultiColumn
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @since 3.0.0
|
||||
* @api
|
||||
*/
|
||||
@@ -24,6 +24,12 @@ class MultiColumnUIBlockFactory extends AbstractUIBlockFactory
|
||||
/** @inheritDoc */
|
||||
public const UI_BLOCK_CLASS_NAME = MultiColumn::class;
|
||||
|
||||
/**
|
||||
* @api
|
||||
* @param string|null $sId
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Layout\MultiColumn\MultiColumn
|
||||
*/
|
||||
public static function MakeStandard(?string $sId = null)
|
||||
{
|
||||
$oInput = new MultiColumn($sId);
|
||||
|
||||
@@ -15,7 +15,8 @@ use Combodo\iTop\Application\UI\Base\Component\Html\Html;
|
||||
* Class UIContentBlockUIBlockFactory
|
||||
*
|
||||
* @author Guillaume Lajarige <guillaume.lajarige@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Layout
|
||||
* @package UIBlockExtensibilityAPI
|
||||
* @api
|
||||
* @since 3.0.0
|
||||
*/
|
||||
class UIContentBlockUIBlockFactory extends AbstractUIBlockFactory
|
||||
@@ -28,6 +29,7 @@ class UIContentBlockUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Make an empty UIContentBlock which can be used to embed anything or to surround another block with specific CSS classes.
|
||||
*
|
||||
* @api
|
||||
* @param string|null $sId
|
||||
* @param array $aContainerClasses
|
||||
*
|
||||
@@ -42,6 +44,7 @@ class UIContentBlockUIBlockFactory extends AbstractUIBlockFactory
|
||||
* Used to display a block of code like <pre> but allows line break.
|
||||
* The \n are replaced by <br>
|
||||
*
|
||||
* @api
|
||||
* @param string $sCode
|
||||
* @param string|null $sId
|
||||
*
|
||||
@@ -59,6 +62,7 @@ class UIContentBlockUIBlockFactory extends AbstractUIBlockFactory
|
||||
/**
|
||||
* Used to display a block of preformatted text in a <pre> tag.
|
||||
*
|
||||
* @api
|
||||
* @param string $sCode
|
||||
* @param string|null $sId
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user