Back to UCMContent class

Method __construct

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

Method __construct - Source code

/**
 * Instantiate UCMContent.
 *
 * @param   TableInterface  $table  The table object
 * @param   string          $alias  The type alias
 * @param   UCMType         $type   The type object
 *
 * @since   3.1
 */
public function __construct(TableInterface $table = null, $alias = null, UCMType $type = null)
{
    parent::__construct($alias, $type);
    if ($table) {
        $this->table = $table;
    } else {
        $tableObject = json_decode($this->type->type->table);
        $this->table = Table::getInstance($tableObject->special->type, $tableObject->special->prefix, $tableObject->special->config);
    }
}