mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 03:58:45 +02:00
Merge branch 'support/3.0' into develop
# Conflicts: # application/applicationextension.inc.php
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user