Back to FormView class

Method __construct

public
__construct
(array $config)
Constructor
Parameters
  • array $config An optional associative array of configuration settings.
Class: FormView
Project: Joomla

Method __construct - Source code

/**
 * Constructor
 *
 * @param   array  $config  An optional associative array of configuration settings.
 */
public function __construct(array $config)
{
    parent::__construct($config);
    if (isset($config['help_link'])) {
        $this->helpLink = $config['help_link'];
    }
    if (isset($config['toolbar_icon'])) {
        $this->toolbarIcon = $config['toolbar_icon'];
    } else {
        $this->toolbarIcon = 'pencil-2 ' . $this->getName() . '-add';
    }
    // Set default value for $canDo to avoid fatal error if child class doesn't set value for this property
    $this->canDo = new CMSObject();
}