mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
412 lines
12 KiB
XML
412 lines
12 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.7">
|
|
<snippets>
|
|
<!-- These snippets just implements application/applicationextension.inc.php APIs for the ApplicationExtensionTest unit test -->
|
|
<snippet id="ExampleFor_iLoginFSMExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iLoginFSMExtension extends \AbstractLoginFSMExtension
|
|
{
|
|
public function ListSupportedLoginModes()
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iLogoutExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iLogoutExtension implements \iLogoutExtension
|
|
{
|
|
public function LogoutAction()
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
|
|
public function ListSupportedLoginModes()
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iLoginUIExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iLoginUIExtension implements \iLoginUIExtension
|
|
{
|
|
public function GetTwigContext()
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
|
|
public function ListSupportedLoginModes()
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iPreferencesExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iPreferencesExtension extends \AbstractPreferencesExtension
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iApplicationUIExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iApplicationUIExtension extends \AbstractApplicationUIExtension
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iApplicationObjectExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iApplicationObjectExtension extends \AbstractApplicationObjectExtension
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iPopupMenuExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iPopupMenuExtension implements \iPopupMenuExtension
|
|
{
|
|
public static function EnumItems($iMenuId, $param)
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_ApplicationPopupMenuItem" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_ApplicationPopupMenuItem extends \ApplicationPopupMenuItem
|
|
{
|
|
public function GetMenuItem()
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iPageUIExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iPageUIExtension extends \AbstractPageUIExtension
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExamplePageUIBlockExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iPageUIBlockExtension extends \AbstractPageUIBlockExtension
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iBackofficeLinkedScriptsExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iBackofficeLinkedScriptsExtension implements \iBackofficeLinkedScriptsExtension
|
|
{
|
|
public function GetLinkedScriptsAbsUrls(): array
|
|
{
|
|
return [
|
|
'https://foo.bar/first.js',
|
|
'https://foo.bar/second.js',
|
|
];
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iBackofficeEarlyScriptExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iBackofficeEarlyScriptExtension implements \iBackofficeEarlyScriptExtension
|
|
{
|
|
public function GetEarlyScript(): string
|
|
{
|
|
return <<<JS
|
|
console.log('This is a PHP unit test');
|
|
JS;
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iBackofficeScriptExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iBackofficeScriptExtension implements \iBackofficeScriptExtension
|
|
{
|
|
public function GetScript(): string
|
|
{
|
|
return <<<JS
|
|
console.log('This is a PHP unit test');
|
|
JS;
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iBackofficeInitScriptExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iBackofficeInitScriptExtension implements \iBackofficeInitScriptExtension
|
|
{
|
|
public function GetInitScript(): string
|
|
{
|
|
return <<<JS
|
|
console.log('This is a PHP unit test');
|
|
JS;
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iBackofficeReadyScriptExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iBackofficeReadyScriptExtension implements \iBackofficeReadyScriptExtension
|
|
{
|
|
public function GetReadyScript(): string
|
|
{
|
|
return <<<JS
|
|
console.log('This is a PHP unit test');
|
|
JS;
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iBackofficeLinkedStylesheetsExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iBackofficeLinkedStylesheetsExtension implements \iBackofficeLinkedStylesheetsExtension
|
|
{
|
|
public function GetLinkedStylesheetsAbsUrls(): array
|
|
{
|
|
return [
|
|
'https://foo.bar/first.css',
|
|
'https://foo.bar/second.css',
|
|
];
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iBackofficeStyleExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iBackofficeStyleExtension implements \iBackofficeStyleExtension
|
|
{
|
|
public function GetStyle(): string
|
|
{
|
|
return <<<CSS
|
|
.foo {
|
|
color: inherit;
|
|
}
|
|
CSS;
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iBackofficeDictEntriesExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iBackofficeDictEntriesExtension implements \iBackofficeDictEntriesExtension
|
|
{
|
|
public function GetDictEntries(): array
|
|
{
|
|
return [
|
|
'Foo:First' => 'Foo is first',
|
|
'Foo:Second' => 'Foo is second',
|
|
];
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iBackofficeDictEntriesPrefixesExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iBackofficeDictEntriesPrefixesExtension implements \iBackofficeDictEntriesPrefixesExtension
|
|
{
|
|
public function GetDictEntriesPrefixes(): array
|
|
{
|
|
return [
|
|
'Foo:',
|
|
'Bar:',
|
|
];
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iPortalUIExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iPortalUIExtension extends \AbstractPortalUIExtension
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iQueryModifier" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iQueryModifier implements \iQueryModifier
|
|
{
|
|
public function __construct()
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
|
|
public function GetFieldExpression(QueryBuilderContext &$oBuild, $sClass, $sAttCode, $sColId, Expression $oFieldSQLExp, SQLQuery &$oSelect)
|
|
{
|
|
return $oFieldSQLExp;
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iOnClassInitialization" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iOnClassInitialization implements \iOnClassInitialization
|
|
{
|
|
public function OnAfterClassInitialization($sClass)
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iFieldRendererMappingsExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iFieldRendererMappingsExtension implements \iFieldRendererMappingsExtension
|
|
{
|
|
public static function RegisterSupportedFields(): array
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iModuleExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iModuleExtension implements \iModuleExtension
|
|
{
|
|
public function __construct()
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iKPILoggerExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iKPILoggerExtension implements \iKPILoggerExtension
|
|
{
|
|
public function InitStats()
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
|
|
public function LogOperation($oKpiLogData)
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<snippet id="ExampleFor_iBackupExtraFilesExtension" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iBackupExtraFilesExtension implements \iBackupExtraFilesExtension
|
|
{
|
|
public function GetExtraFilesRelPaths(): array
|
|
{
|
|
return [
|
|
'foo'
|
|
];
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<!-- These snippets just implements core/modulehandler.class.inc.php APIs for the ApplicationExtensionTest unit test -->
|
|
<snippet id="ExampleFor_ModuleHandlerApiInterface" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_ModuleHandlerApiInterface extends \ModuleHandlerAPI
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
<!-- These snippets just implements application/newsroomprovider.class.inc.php APIs for the ApplicationExtensionTest unit test -->
|
|
<snippet id="ExampleFor_iNewsroomProvider" _delta="define">
|
|
<placement>core</placement>
|
|
<rank>0</rank>
|
|
<content><![CDATA[
|
|
class ExampleFor_iNewsroomProvider extends \NewsroomProviderBase
|
|
{
|
|
public function GetLabel()
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
|
|
public function GetFetchURL()
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
|
|
public function GetMarkAllAsReadURL()
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
|
|
public function GetViewAllURL()
|
|
{
|
|
// Do nothing, we just need the class to exists for the unit test
|
|
}
|
|
}
|
|
]]></content>
|
|
</snippet>
|
|
</snippets>
|
|
</itop_design> |