Back to BaseDatabaseModel class

Method _createTable

protected \Joomla\CMS\Table\Table|bool
_createTable
(mixed $name, mixed $prefix = 'Table', mixed $config = array())
Method to load and return a table object.
Parameters
  • string $name The name of the view
  • string $prefix The class prefix. Optional.
  • array $config Configuration settings to pass to Table::getInstance
Returns
  • \Joomla\CMS\Table\Table|bool Table object or boolean false if failed
Since
  • 3.0
-
  • \JTable::getInstance()

Method _createTable - Source code

/**
 * Method to load and return a table object.
 *
 * @param   string  $name    The name of the view
 * @param   string  $prefix  The class prefix. Optional.
 * @param   array   $config  Configuration settings to pass to Table::getInstance
 *
 * @return  Table|boolean  Table object or boolean false if failed
 *
 * @since   3.0
 * @see     \JTable::getInstance()
 */
protected function _createTable($name, $prefix = 'Table', $config = array())
{
    // Make sure we are returning a DBO object
    if (!\array_key_exists('dbo', $config)) {
        $config['dbo'] = $this->getDbo();
    }
    return $this->getMVCFactory()->createTable($name, $prefix, $config);
}