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.

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

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support