default controller in new arhitecture - Joomla! Forum - community, help and support
hi!
i'm trying use new platform 12.1 develop component.
i wrote default controller it, don't undestand, maybe wrong - code looks strange.
i'm trying use new platform 12.1 develop component.
i wrote default controller it, don't undestand, maybe wrong - code looks strange.
code: select all
class jmcsignbycallcontroller extends jcontrollerbase{
public function execute(){
$input = $this->getinput()->get('view');
jloader::register('jmcsignbycallview'.ucfirst($input),jpath_component.'/views/'.$input.'/view.html.php');
jloader::register('jmcsignbycallmodel'.ucfirst($input),jpath_component.'/models/'.$input.'.php');
$viewnm = 'jmcsignbycallview'.ucfirst($input);
$modelnm = 'jmcsignbycallmodel'.ucfirst($input);
$model = new $modelnm();
$view = new $viewnm($model);
}
}
Comments
Post a Comment