Получение модели довольно просто. Просто включите модельный файл PHP из компонента в код подключаемого модуля и создайте свои объекты по мере необходимости.
Лучше обрабатывать все манипуляции с таблицами в модели, но есть способы загрузить таблицу в самом подключаемом модуле.
Вот как загрузить модель из плагина:
<?php
// Path to component
$componentPath = JPATH_ADMINISTRATOR . DS . 'components' . DS . 'mycomponent';
// Include model
require_once $componentPath . DS . 'models' . DS . 'example.php';
// You need to specify table_path because by default model uses
// JPATH_COMPONENT_ADMINISTRATOR . DS . 'tables'
// and you will not have correct JPATH_COMPONENT_ADMINISTRATOR in the plu-in
// unless you specify it in config array and pass it to constructor
$config = array(
'table_path' => $componentPath . DS . 'tables'
);
// Create instance
$model = new MycomponentModelExample($config);
?>
Вот как загрузить таблицу из плагина:
<?php
// 1. Add the path so getInstance know where to find the table
$tablePath = JPATH_ADMINISTRATOR . DS . 'components' . DS . 'mycomponent' . DS . 'tables';
JTable::addIncludePath($tablePath);
// 2. Create instance of the table
$tbl = JTable::getInstance('tableName', 'Table');
?>