Build list of actions for this form

@param RequestHandler $controller
@param string $name
@param array $context
@return FieldList
321765
protected function getFormActions(RequestHandler $controller = null, $name, $context = [])
    {
        // @todo Deprecate or formalise support for getCMSActions()
        $actions = $context['Record']->getCMSActions();
        $this->invokeWithExtensions('updateFormActions', $actions, $controller, $name, $context);
        return $actions;
    }
74929
protected function addPutResourceUpdate($name, $base, $controller, $options)
    {
        $uri = $this->getResourceUri($name) .'/{' .$base .'}';

        $action = $this->getResourceAction($name, $controller, 'update', $options);

        return $this->router->put($uri, $action);
    }
101238
public function setController($name, $controller=null)
	{
	    if ($name instanceof Controller) {
	        $controller = $name;
	        $sname = $controller->getName();
	    } elseif ($controller instanceof Controller) {
	        $sname = $name && !is_numeric($name) ? $name : $controller->getName();
	    } else {
	        if ($controller) {
	            $class_name = Ioc::findClass($controller, 'controller');
	        } else {
	            $class_name = Ioc::findClass($name, 'controller');
	        }
	        
	        if ($class_name && is_subclass_of($class_name, "\\Wslim\\Console\\Controller")) {
	            $sname = is_numeric($name) ? null : $name;
	            $controller =  new $class_name($sname);
	            if (!$sname) {
	                $sname = $controller->getName();
	            }
	        } else {
	            throw new \LogicException(sprintf('Controller class "%s" is not exists.', $controller));
	        }
	    }
	    
	    if (!$controller->isEnabled()) {
	        return;
	    }
	    
	    if (null === $controller->getDefinition()) {
	        throw new \LogicException(sprintf('Controller class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', get_class($controller)));
	    }
	    
	    $this->controllers[$sname] = $controller;
	    
	    foreach ($controller->getAliases() as $alias) {
	        $this->controllers[$alias] = $controller;
	    }
	    
	    return $controller;
	}
290649
protected function appendControllers( $name = '' )
  {
    $app = app();
    $data_dir = $this->laravel->path.'/Http/Controllers/Admin';
    $datas_file = $this->laravel->path."/Http/Controllers/Admin/$name.php";
    $this->info( $datas_file );
    $workflow_datas = $app['view']->make('workflow::generators.'.$name)
      ->render();
    $workflow_datas = str_replace("{{ '<?php' }}", '<?php', $workflow_datas);
      if (!file_exists($data_dir)) {
        mkdir($data_dir, 0777, true);
      }

    if( !file_exists( $datas_file ) )
    {
      $fs = fopen($datas_file, 'x');
      if ( $fs )
      {
        fwrite($fs, $workflow_datas);
        $this->line($workflow_datas);
        fclose($fs);
        return true;
      }
      else
      {
        return false;
      }
    }
    else
    {
      return false;
    }
  }
68045
protected static function triggerAopEvent(
        $controller_id,
        $action_name,
        $request = null,
        $response = null
    ) {
    
        $context = [
            'controller_id' => $controller_id,
            'action_id' => $action_name,
        ];
        if ($request) {
            $context['request'] = $request;
        }
        if ($response) {
            $context['response'] = $response;
        }
        Lb::app()->trigger(
            Event::AOP_EVENT . '_' . implode('@', [$controller_id, $action_name]),
            new AopEvent($context)
        );
        Lb::app()->trigger(
            Event::REQUEST_EVENT,
            new RequestEvent($context)
        );
    }
887316
def get_action_handler(self, controller_name, action_name):
        
        try_actions = [
            controller_name + '/' + action_name,
            controller_name + '/not_found',
            # call Index controller to catch all unhandled pages
            'index/not_found'
        ]
        # search first appropriate action handler
        for path in try_actions:
            if path in self._controllers:
                return self._controllers[path]
        return None
935512
private function exec( $controller_name, $args )
	{
		// Process controller
		$compo = explode( '@', $controller_name );

		if ( count( $compo ) <= 1 ) {

			throw new Exception( sprintf( 'Controller action must be defined in %s.', $controller_name ) );

		}

		// Get controller
		require_once(  $this->controllers_path . $compo[0] . '.php' );
		$classname = sprintf( $this->namespace . '\Controllers\%s', $compo[0]);
		$controller = new $classname( $this->view );

		if ( !method_exists( $controller, $compo[1] ) ) {

			throw new Exception( sprintf( 'Controller action "%s" not found in %s.', $compo[1], $compo[0] ) );

		}

		return call_user_func_array( [ $controller, $compo[1] ], $args );
	}
834321
public function post(
        string $definition,
        RequestHandlerInterface $handler,
        ?string $name = null,
        $data = null
    ): Route {
        return $this->route(Method::POST, $definition, $handler, $name, $data);
    }
1289545
private function _getRoute( $controller_name, $action_name )
    {
        $_route = $this->_createRoute( $controller_name, $action_name );

        foreach( $this->_routes as $route )
        {
            if ( $route->getControllerName() == $_route->getControllerName() && $route->getActionName() == $_route->getActionName() )
            {
                return $route;
            }
        }
    }
1141530
protected function _actionBrowse(ControllerContext $context)
    {
        $entity = $this->getModel()->fetch();

        //Set the entity in the context
        $context->setEntity($entity);

        return $entity;
    }
455718
private function getRequestDataAndMethodOptions(RequestContext $context)
    {
        $curlOptions = array();

        $requestData = $context->getRequestData();

        $url = $context->getRequestUrl();

        switch ($context->getMethod()) {
            case RequestContext::METHOD_GET:
                $curlOptions[CURLOPT_HTTPGET] = 1;
                $url = $context->attachQueryToUrl($url, $requestData);
                break;
            case RequestContext::METHOD_POST:
                $curlOptions[CURLOPT_POST] = 1;
                $curlOptions[CURLOPT_POSTFIELDS] = $requestData;
                break;
            default:
                $curlOptions[CURLOPT_CUSTOMREQUEST] = $context->getMethod();
                $curlOptions[CURLOPT_POSTFIELDS] = $requestData;
        }

        $curlOptions[CURLOPT_URL] = $url;

        return $curlOptions;
    }
515269
public function execute($name, AnCommandContext $context)
    {
        $parts = explode('.', $name);

        if ($parts[0] == 'before') {
            $value = pick($this->{$this->getIdentifiableKey()}, $context->data->{$this->getIdentifiableKey()});

            if ($value) {
                $parent = $this->getParentRepository()->fetch($value);

                $this->setParent($parent);

                //set the entity owner as the context actor of the controller
                if ($parent && $this->getRepository()->isOwnable() && $this->isOwnable()) {
                    $this->setActor($parent->owner);
                }

                $context->data['parent'] = $parent;
            }
        }
    }
1262031
public function buildSiteList(ControllerContext $controllerContext)
    {
        $requestUriHost = $controllerContext->getRequest()->getHttpRequest()->getUri()->getHost();

        $domainsFound = false;
        $sites = [];
        foreach ($this->siteRepository->findOnline() as $site) {
            $uri = null;
            $active = false;
            /** @var $site Site */
            if ($site->hasActiveDomains()) {
                $activeHostPatterns = $site->getActiveDomains()->map(function ($domain) {
                    return $domain->getHostname();
                })->toArray();
                $active = in_array($requestUriHost, $activeHostPatterns, true);
                if ($active) {
                    $uri = $controllerContext->getUriBuilder()
                        ->reset()
                        ->setCreateAbsoluteUri(true)
                        ->uriFor('index', [], 'Backend\Backend', 'Neos.Neos');
                } else {
                    $uri = $controllerContext->getUriBuilder()
                        ->reset()
                        ->uriFor('switchSite', ['site' => $site], 'Backend\Backend', 'Neos.Neos');
                }
                $domainsFound = true;
            }

            $sites[] = [
                'name' => $site->getName(),
                'nodeName' => $site->getNodeName(),
                'uri' => $uri,
                'active' => $active
            ];
        }

        if ($domainsFound === false) {
            $uri = $controllerContext->getUriBuilder()
                ->reset()
                ->setCreateAbsoluteUri(true)
                ->uriFor('index', [], 'Backend\Backend', 'Neos.Neos');
            $sites[0]['uri'] = $uri;
        }

        return $sites;
    }
549898
private function getHttpGetVars(BaseController $controller, string $methodName): array
    {
        $requestParams = [];
        $reflectionMethod = new \ReflectionMethod($controller, $methodName);
        $reflectionParameters = $reflectionMethod->getParameters();
        foreach ($reflectionParameters as $reflectionParameter) {
            $name = $reflectionParameter->getName();
            $queryParams = $this->request->getQueryParams();
            if (isset($queryParams[$name])) {
                $requestParams[$name] = $queryParams[$name];
            }
        }

        return $requestParams;
    }
457811
protected function filterHandlers($type, $name, RequestAbstract $request)
    {
        $filteredHandlers = array();
        
        foreach ($this->handlers[$type][$name] as $priority => $handlers) {
            foreach ($handlers as $handlerName) {
                if ($type === self::EVENT && !$this->compareRequestWithInterface($request, $handlerName)) {
                    continue;
                }
                
                $filteredHandlers[] = $handlerName;
            }
        }

        return array_unique($filteredHandlers);
    }
761374
public function serializePayload(ControllerContext $controllerContext)
    {
        $nodeService = new NodeService();
        $node = $this->getNode();

        return [
            'contextPath' => $node->getContextPath(),
            'identifier' => $node->getIdentifier(),
            'isDocument' => $nodeService->isDocument($node)
        ];
    }
1274007
protected function _actionRead(ControllerContext $context)
    {
        if(!$context->result instanceof ModelEntityInterface)
        {
            if($this->getModel()->getState()->isUnique())
            {
                $entity = $this->getModel()->fetch();

                if(!count($entity))
                {
                    $name   = ucfirst($this->getView()->getName());
                    throw new ControllerExceptionResourceNotFound($name.' Not Found');
                }
            }
            else $entity = $this->getModel()->create();
        }
        else $entity = $context->result;

        //Set the entity in the context
        $context->setEntity($entity);

        return $entity;
    }