コード例 #1
0
 /**
  * Use this to parse your backend page
  *
  * You will get the template located in /View/Template/{CMD}.html
  * You can access Cx class using $this->cx
  * To show messages, use \Message class
  * @param \Cx\Core\Html\Sigma $template Template for current CMD
  * @param array $cmd CMD separated by slashes
  */
 public function parsePage(\Cx\Core\Html\Sigma $template, array $cmd)
 {
     // this class inherits from Controller, therefore you can get access to
     // Cx like this:
     $this->cx;
     $this->template = $template;
     $act = $cmd[0];
     /* If the act is not empty, we are not on the first tab an we can use parsePage() from
           SystemComponentBackendController to create the view.
           If act is empty, we are on first tab where parent::parsePage() will not work, because ViewGenerator does
           not support views on first tab of components.
           Note: This function (parsePage) can be removed as soon as ViewGenerator has first tab support
        */
     if ($act != '') {
         parent::parsePage($template, $cmd);
     } else {
         $this->connectToController('Default');
     }
     \Message::show();
 }
コード例 #2
0
 /**
  * Use this to parse your backend page
  * 
  * You will get the template located in /View/Template/{CMD}.html
  * You can access Cx class using $this->cx
  * To show messages, use \Message class
  * @param \Cx\Core\Html\Sigma $template Template for current CMD
  * @param array $cmd CMD separated by slashes
  */
 public function parsePage(\Cx\Core\Html\Sigma $template, array $cmd)
 {
     // this class inherits from Controller, therefore you can get access to
     // Cx like this:
     $this->cx;
     $this->template = $template;
     $act = $cmd[0];
     //Check whether the page has the permission to access
     $this->checkAccessPermission($act);
     /* If the act is not empty, we are not on the first tab an we can use parsePage() from
          SystemComponentBackendController to create the view.
          If act is empty, we are on first tab where parent::parsePage() will not work, because ViewGenerator does
          not support views on first tab of components.
          We use a own controller for subscriptions because we have an filter there.
        */
     if ($act != '' && $act != 'subscription') {
         parent::parsePage($this->template, $cmd);
     } else {
         $this->connectToController($act);
     }
     \Message::show();
 }