JPlugin: Difference between revisions
From Joomla! Documentation
New page: <span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
</span>
{{Description:JPlugin}}
===Defined in===
libra... |
m preparing for archive only |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
===Defined in=== | ===Defined in=== | ||
libraries/joomla/plugin/plugin.php | libraries/joomla/plugin/plugin.php | ||
| Line 21: | Line 16: | ||
|Loads the plugin language file | |Loads the plugin language file | ||
|} | |} | ||
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.plugin.plugin' );</source> | <source lang="php">jimport( 'joomla.plugin.plugin' );</source> | ||
JPlugin is an abstract class. | |||
JPlugin Inherits JEvent. | |||
Located in /libraries/joomla/plugin/plugin.php | |||
It's mainly used for loading language file. | |||
---- | |||
Public Member Functions: | |||
__construct (&$subject, $config=array()) | |||
loadLanguage ($extension= '', $basePath=JPATH_ADMINISTRATOR) | |||
---- | |||
Data Fields: | |||
$params = null | |||
Protected Attributes | |||
$_name = null | |||
$_type = null | |||
---- | |||
Constructor & Destructor Documentation: | |||
__construct ( &$ subject, | |||
$ config = array() | |||
) | |||
Constructor | |||
Parameters: | |||
object $subject The object to observe | |||
array $config An optional associative array of configuration settings. Recognized key values include 'name', 'group', 'params', 'language' (this list is not meant to be comprehensive). | |||
---- | |||
Member Function Documentation | |||
loadLanguage ( $ extension = '', | |||
$ basePath = JPATH_ADMINISTRATOR | |||
) | |||
Loads the plugin language file | |||
public | |||
Parameters: | |||
string $extension The extension for which a language file should be loaded | |||
string $basePath The basepath to use | |||
Returns: | |||
boolean True, if the file has successfully loaded. | |||
---- | |||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JPlugin | category=JPlugin | ||
namespace=CodeExample | |||
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
Latest revision as of 01:02, 25 March 2017
Defined in
libraries/joomla/plugin/plugin.php
Methods
| Method name | Description |
|---|---|
| JPlugin | Constructor |
| __construct | Constructor |
| loadLanguage | Loads the plugin language file |
Importing
jimport( 'joomla.plugin.plugin' );
JPlugin is an abstract class.
JPlugin Inherits JEvent.
Located in /libraries/joomla/plugin/plugin.php
It's mainly used for loading language file.
Public Member Functions: __construct (&$subject, $config=array())
loadLanguage ($extension= , $basePath=JPATH_ADMINISTRATOR)
Data Fields: $params = null Protected Attributes
$_name = null $_type = null
Constructor & Destructor Documentation:
__construct ( &$ subject, $ config = array() ) Constructor
Parameters: object $subject The object to observe array $config An optional associative array of configuration settings. Recognized key values include 'name', 'group', 'params', 'language' (this list is not meant to be comprehensive).
Member Function Documentation
loadLanguage ( $ extension = , $ basePath = JPATH_ADMINISTRATOR ) Loads the plugin language file
public
Parameters: string $extension The extension for which a language file should be loaded string $basePath The basepath to use Returns: boolean True, if the file has successfully loaded.
Examples
Code Examples