Back to UCMBase class

Method __construct

public
__construct
(mixed $alias = null, \Joomla\CMS\UCM\UCMType $type = null)
Instantiate the UCMBase.
Parameters
  • string $alias The alias string
  • \Joomla\CMS\UCM\UCMType $type The type object
Since
  • 3.1
Class: UCMBase
Project: Joomla

Method __construct - Source code

/**
 * Instantiate the UCMBase.
 *
 * @param   string   $alias  The alias string
 * @param   UCMType  $type   The type object
 *
 * @since   3.1
 */
public function __construct($alias = null, UCMType $type = null)
{
    // Setup dependencies.
    $input = Factory::getApplication()->input;
    $this->alias = $alias ?: $input->get('option') . '.' . $input->get('view');
    $this->type = $type ?: $this->getType();
}