Esempio n. 1
0
 public function actionGetactioncheckbox()
 {
     if (isset($_POST['controller']) && isset($_POST['module'])) {
         $actions = ControllerActionsName::getActions($_POST['controller'], $_POST['module']);
         if ($actions != null) {
             $array_action = array_map('trim', explode(",", trim($actions)));
             MyDebug::output($array_action);
         }
     }
 }
Esempio n. 2
0
 public function actionGetactionsname()
 {
     if (isset($_POST['controller'])) {
         if (isset($_POST['module'])) {
             if (ControllerActionsName::getActions($_POST['controller'], $_POST['module']) != null) {
                 echo ControllerActionsName::getActions($_POST['controller'], $_POST['module']);
             } else {
                 return false;
             }
         } else {
             if (ControllerActionsName::getActions($_POST['controller']) != null) {
                 echo ControllerActionsName::getActions($_POST['controller']);
             } else {
                 return false;
             }
         }
     }
 }
Esempio n. 3
0
 public static function genControllerActions()
 {
     $modules = array('admin', 'member', null);
     foreach ($modules as $key => $value) {
     }
     //admin
     //        $controllers = ControllerActionsName::getControllers('admin');
     //        foreach($controllers as $key => $value)
     //        {
     //            $controller = new Controllers;
     //            $controller->controller_name = $value;
     //
     //            $action = ControllerActionsName::getActions($value, "admin");
     //            $controller->actions = $action;
     //            $controller->module_name = "admin";
     //            MyDebug::output($controller->attributes);
     //            $controller->save();
     //        }
     //frontend
     $controllers = ControllerActionsName::getControllers();
     foreach ($controllers as $key => $value) {
         $controller = new Controllers();
         $controller->controller_name = $value;
         $action = ControllerActionsName::getActions($value);
         $controller->actions = $action;
         //$controller->module_name = "admin";
         MyDebug::output($controller->attributes);
         //$controller->save();
     }
 }