getActions() public method

Returns all available actions of the specified controller.
public getActions ( Controller $controller ) : array
$controller yii\console\Controller the controller instance
return array all available action IDs.
 public function getActions($controller)
 {
     // Fallback ot default implementation if not dealing with out module's commands.
     if (!$controller instanceof ApiController) {
         return parent::getActions($controller);
     }
     $actions = array_keys($controller->actions());
     return array_unique($actions);
 }
 protected function getPublicActions($controller, $module = '')
 {
     $c = models\RbacAuthitems::createControllerPath($module, $controller);
     if (!class_exists($c, false)) {
         include_once $controller;
     }
     $controllerModel = new $c($c, null);
     $help = new HelpController('HelpController', null);
     //获取class的public并且不是static的action名字
     $controllerActions = $help->getActions($controllerModel);
     return $controllerActions;
 }