The actual action method of a dashboard controller
350696
def index
      authorize model
      fetch_and_set_all
      action_buttons(index_properties)

      @_tools_buttons = index_properties.tool_buttons || {}
      index_hook(@resources)

      return if _override_views.include? :index
      render 'faalis/dashboard/resource/index'
    end
97334
function () {
                var report = new ariaWidgetsControllersReportsDropDownControllerReport();
                report.displayDropDown = (this._listWidget == null);
                if (this._dataModel && this._dataModel.displayIdx !== this._dataModel.selectedIdx) {
                    this._setDisplayIdx(this._dataModel.displayIdx);
                }
                return report;
            }
1290310
function () {
    var buttonState;
    var controller = this.controller;
    var id;

    if (!controller) { return; }

    // Check every button.
    for (id = 0; id < controller.buttons.length; ++id) {
      // Initialize button state.
      if (!this.buttonStates[id]) {
        this.buttonStates[id] = {pressed: false, touched: false, value: 0};
      }
      if (!this.buttonEventDetails[id]) {
        this.buttonEventDetails[id] = {id: id, state: this.buttonStates[id]};
      }

      buttonState = controller.buttons[id];
      this.handleButton(id, buttonState);
    }
    // Check axes.
    this.handleAxes();
  }
130676
private function runController(): void
    {
        //get route information
        $action = $this->routeAction;
        $param = $this->routeParam;

        //action - call controller passing params
        if (!empty($param)) {
            \call_user_func_array([$this->controller, $action], $param);
            return;
        }

        //action - call controller
        if ($action) {
            \call_user_func([$this->controller, $action]);
        }
    }
201602
public function run(): void
    {
        try {
            /** @var \Ffcms\Core\Arch\Controller $callClass */
            $callClass = $this->getCallbackClass();
            $callMethod = 'action' . self::$Request->getAction();
            $arguments = self::$Request->getArguments();

            // check if callback method (action) is exist in class object
            if (!method_exists($callClass, $callMethod)) {
                throw new NotFoundException('Method "' . App::$Security->strip_tags($callMethod) . '()" not founded in "' . get_class($callClass) . '"');
            }

            // check if method arguments counts equals passed count
            $requiredArgCount = $this->getMethodRequiredArgCount($callClass, $callMethod);

            // compare method arg count with passed
            if (count($arguments) < $requiredArgCount) {
                throw new NotFoundException(__('Arguments for method %method% is not enough. Expected: %required%, got: %current%.', [
                    'method' => $callMethod,
                    'required' => $requiredArgCount,
                    'current' => count($arguments)
                ]));
            }

            // make callback call to action in controller and get response
            $response = call_user_func_array([$callClass, $callMethod], $arguments);

            // if no response - throw 404 not found
            if (!$response) {
                throw new NotFoundException('Page not found: 404 error');
            }
        } catch (\Exception $e) {
            // check if exception is system-based throw
            if ($e instanceof TemplateException) {
                $response = $e->display();
            } else { // or hook exception to system based :)))
                if (App::$Debug) {
                    $msg = $e->getMessage() . $e->getTraceAsString();
                    $response = (new NativeException($msg))->display();
                } else {
                    $response = (new NativeException($e->getMessage()))->display();
                }
            }
        }

        // set full rendered content to response builder
        self::$Response->setContent($response);
        // echo full response to user via symfony http foundation
        self::$Response->send();
    }
945649
public function get_controller_actions($controller_classname, $filter_base_methods = true)
	{
	    $controller_classname = $this->get_controller_classname($controller_classname);
	    
		$methods = get_class_methods($controller_classname);
		
		if(isset($methods) && !empty($methods))
		{
    		if($filter_base_methods)
    		{
    			$baseMethods = get_class_methods('Controller');
    		
    			$ctrl_cleaned_methods = array();
    		    foreach($methods as $method)
    		    {
    		        if(!in_array($method, $baseMethods) && strpos($method, '_') !== 0)
    				{
    				    $ctrl_cleaned_methods[] = $method;
    				}
    		    }
    		    
    		    return $ctrl_cleaned_methods;
    		}
    		else
    		{
    			return $methods;
    		}
		}
		else
		{
		    return array();
		}
	}
527540
def report(controller)
      return if results.empty?

      action_display = "#{controller.controller_name}##{controller.action_name}"
      SnipSnip.logger.info(action_display)

      results.sort_by(&:report).each do |result|
        SnipSnip.logger.info("  #{result.report}")
      end
    ensure
      Registry.clear
    end
635457
function () {
    this.controller = controllerUtils.findMatchingControllerWebXR(
      this.system.controllers,
      this.data.hand
    );
    // Legacy handle to the controller for old components.
    this.el.components['tracked-controls'].controller = this.controller;

    if (this.data.autoHide) { this.el.object3D.visible = !!this.controller; }
  }
1272125
public function run()
    {
        // Creates the current controller instance
        $this->controller = new $this->controller($this->twig);

        // Calls the action method on the controller
        $response = call_user_func([$this->controller, $this->action]);

        // Shows the response
        echo $response;
    }
308947
public function run() {
        $this->_hookManager->runBeforeSystem();

        $urlArray = explode('/', $this->_url);
        //Deletes last element if empty
        $lastElement = end($urlArray);
        if ($lastElement == '') {
            array_pop($urlArray);
        }
        reset($urlArray);

        // If present take the first element as the controller
        $tmpController = isset($urlArray[0]) ? array_shift($urlArray) : 'index';
        $action = null;

        //Prepare the GET params in order to pass them to the Controller
        $myGet = $_GET;
        if(isset($myGet['url'])){
            unset($myGet['url']);
        }

        if ($this->applyStaticRouting($tmpController)) {
            $this->_hookManager->runBefore(); // Runs before controller hooks
            include(ROOT . DS . $tmpController);
            $this->_hookManager->runAfter(); // Runs after controller hooks
        } elseif ($this->applyRouting($tmpController, $action, $urlArray)) {
            ($action === null) ? $action = 'index' : $action;
            $tmpController = '\\pff\\controllers\\'.$tmpController;
            $controller = new $tmpController($tmpController, $this, $action, array_merge($urlArray,$myGet));
        } elseif (file_exists(ROOT . DS . 'app' . DS . 'controllers' . DS . ucfirst($tmpController) . '_Controller.php')) {
            $action = isset($urlArray[0]) ? array_shift($urlArray) : 'index';
            $controllerClassName = '\\pff\\controllers\\'.ucfirst($tmpController) . '_Controller';
            $controller          = new $controllerClassName($tmpController, $this, $action, array_merge($urlArray,$myGet));
        } else {
            throw new RoutingException('Cannot find a valid controller.', 404);
        }

        if (isset($controller)) {
            $this->_action = $action;
            $this->_moduleManager->setController($controller); // We have a controller, let the modules know about it
            ob_start();
            $this->_hookManager->runBefore(); // Runs before controller hooks
            if ((int)method_exists($controller, $this->_action)) {
                call_user_func_array(array($controller, "beforeAction"), $urlArray);
                call_user_func(array($controller, "beforeFilter"));
                call_user_func_array(array($controller, $this->_action), $urlArray);
                call_user_func(array($controller, "afterFilter"));
                call_user_func_array(array($controller, "afterAction"), $urlArray);
                $this->_hookManager->runAfter(); // Runs after controller hooks
                ob_end_flush();
            } else {
                throw new RoutingException('Not a valid action: ' . $action, 404);
            }
        }
    }
226541
function(controller, actions, callback) {
            self.worker.context.routes = self.worker.context.routes.concat(
                actions
            );
            callback(null, controller);
        }
853442
def lookup_action #:nodoc:
      @lookup_action ||= begin
        action = template.controller && template.controller.action_name
        return unless action
        action = action.to_s
        ACTIONS[action] || action
      end
    end
989723
def update
      return render json: { errors: { message: 'Dashboard not found' } }, status: :not_found unless dashboard

      # Abort on failure
      unless dashboard.update(dashboard_params)
        return render json: { errors: dashboard.errors }, status: :bad_request
      end

      MnoEnterprise::EventLogger.info('dashboard_update', current_user.id, 'Dashboard Update', dashboard)
      render :show
    end
762199
public function updateDashboard()
    {
        $dashboardId = (int) $this->request->postVar('dashboard');
        $items = (array) $this->request->postVar('order');
        
        if ($dashboardId) {
            $dashboard = $this->dataService->memberDashboardById($dashboardId);
            if ($dashboard && $dashboard->exists()) {
                $dashboard->Widgets()->removeAll();
                if (is_array($items)) {
                    foreach ($items as $i => $widgetId) {
                        $widget = $this->dataService->dashletById($widgetId);
                        if ($widget) {
                            $widget->ParentID = $dashboard->ID;
                            $widget->Sort = $i+1;    // need +1 here so there's no 0 sort val, otherwise onbeforewrite sets it automatically.
                            $widget->write();
                        }
                    }
                }
            }
        }
    }
778452
def isActiveDashboardOverlay(self, ulOverlayHandle):
        """"""

        fn = self.function_table.isActiveDashboardOverlay
        result = fn(ulOverlayHandle)
        return result
862059
private boolean checkActionMethod(AppController controller, String actionMethod) {
        HttpMethod method = HttpMethod.getMethod(RequestContext.getHttpRequest());
        if (!controller.actionSupportsHttpMethod(actionMethod, method)) {
            DirectResponse res = new DirectResponse("");
            //see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
            res.setStatus(405);
            LOGGER.warn("Requested action does not support HTTP method: " + method.name() + ", returning status code 405.");
            RequestContext.setControllerResponse(res);

            //TODO: candidate for caching below, list of allowed HTTP methods
            //see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
            RequestContext.getHttpResponse().setHeader("Allow", join(controller.allowedActions(actionMethod), ", "));
            return false;
        }
        return true;
    }
344309
def run(self):
        
        while True:
            data, sender = self.sock.recvfrom(1024)
            addr = sender[0]
            msg = data.decode('utf-8')
            if msg.startswith('/controller/'):
                try:
                    uid = msg.split('/')[2]
                    if uid == 'new':
                        port = int(msg.split('/')[3])
                        self._new_controller(addr, port)
                    else:
                        cmd = msg.split('/')[3]
                        if cmd == 'ping':
                            port = msg.split('/')[3]
                            self._ping(uid, addr, port)
                        elif cmd == 'kthxbye':
                            self._del_controller(uid)
                        elif cmd == 'states':
                            states = msg.split('/')[4]
                            self._update_states(uid, states)
                        elif cmd == 'text':
                            # /controller/<uid>/text/<text>
                            text = msg[12 + len(uid) + 6:]
                            self._got_message(uid, text)
                except IndexError or KeyError:
                    pass
            else:
                pass

            # find unused controllers and delete them
            ctlrs = self.controllers.items()
            for uid, state in ctlrs:
                if state[3] < time.time() - 60:
                    self.controllers.pop(uid)