Actions

API15

JPlugin/ construct

From Joomla! Documentation

< API15:JPlugin
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Constructor

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax

__construct(&$subject, $config=array())
Parameter Name Default Value Description
&$subject
$config array()

Defined in

libraries/joomla/plugin/plugin.php

Importing

jimport( 'joomla.plugin.plugin' );

Source Body

function __construct(& $subject, $config = array())
{
        //Set the parameters
        if ( isset( $config['params'] ) ) {
 
                if(is_a($config['params'], 'JParameter')) {
                        $this->params = $config['params'];
                } else {
                        $this->params = new JParameter($config['params']);
                }
        }
 
        if ( isset( $config['name'] ) ) {
                $this->_name = $config['name'];
        }
 
        if ( isset( $config['type'] ) ) {
                $this->_type = $config['type'];
        }
 
        parent::__construct($subject);
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />