PluginHelper

插件帮助类

抽象

1.5

Joomla CMS

方法

getLayoutPath

获取来自插件的布局路径

getLayoutPath( type,  name,  layout = 'default') : 
静态

3.0

参数

类型

string插件类型

名称

string插件名称

布局

string布局名称

响应

string布局路径

getPlugin

获取特定类型的插件数据(如果未指定特定插件,则仅返回特定插件数据)。

getPlugin( type,  plugin = null) : 
静态

1.5

参数

类型

string插件类型,与插件目录中的子目录相关。

插件

string插件名称。

响应

mixed插件数据对象数组或插件数据对象。

import

加载插件文件。

import( plugin,  autocreate = true, \Joomla\Event\DispatcherInterface dispatcher = null) : 
静态

3.2

参数

插件

object插件。

autocreate

bool是否自动创建。

dispatcher

DispatcherInterface允许插件使用不同的调度程序(可选)。

响应

void

importPlugin

加载特定类型的所有插件文件(如果未指定特定插件,则仅加载特定插件)。

importPlugin( type,  plugin = null,  autocreate = true, \Joomla\Event\DispatcherInterface dispatcher = null) : 
静态

1.5

参数

类型

string插件类型,与插件目录中的子目录相关。

插件

string插件名称。

autocreate

bool自动创建插件。

dispatcher

DispatcherInterface允许插件使用不同的调度程序(可选)。

响应

bool成功时为 true。

isEnabled

检查插件是否已启用。

isEnabled( type,  plugin = null) : 
静态

1.5

参数

类型

string插件类型,与插件目录中的子目录相关。

插件

string插件名称。

响应

bool

load

加载已发布的插件。

load() : mixed||string|int
静态

3.2

响应

array<string|int, mixed>已发布插件的数组

属性

plugins

已加载插件的持久性缓存。

静态

1.7

类型

array<string|int, mixed>|null