Some basic MVC component questions
Posted: Sun May 12, 2019 5:17 pm
Hi,
I'm examining the Joomla basic MVC component example and have some questions:
In this PHP line:
What exactly is $type (beside the name of the table)? What is it exactly used for? In the table definition file\class there is also a table name given in the constructor when calling the JTable parrent class constructor.
$prefix means the class prefix, which is in the table definition .php file?
Furthermore:
"->get()" Which kind of input is accessed this way (i.e. $_GET, $_POST, cookies or sg. else)?
I'm examining the Joomla basic MVC component example and have some questions:
In this PHP line:
Code: Select all
JTable::getInstance($type, $prefix, $config);
$prefix means the class prefix, which is in the table definition .php file?
Furthermore:
Code: Select all
$jinput = JFactory::getApplication()->input;
$id = $jinput->get('id', 1, 'INT');