Returns action component.
@param string $name
@param bool $need
@return Action
181124
public function getAction($name, $need = TRUE)
    {
        return $this->hasActions()
            ? $this->getComponent(Action::ID)->getComponent($name, $need)
            : NULL;
    }
723431
public function massAction ($name)
    {          
        $dataGrid = $this->getDataGrid($name);
        
        $action = $this->getRequest()->get('action');
        
        if (!$action){
            throw new \InvalidArgumentException('Parameter "action" in not valid'); 
        }
        
        $handler = $this->container->get('neutron_data_grid.handler.datagrid');
        $handler
            ->setDataGrid($dataGrid)
            ->resolveOptions($this->getRequestParameters())
            ->buildQuery()
        ;
        
        $ids = $this->getRequest()->get('ids', array());
        $selectAll = ($this->getRequest()->get('selectAll') === 'true');

        $event = new MassActionEvent($name, $action, $ids, $selectAll, $handler->getQuery());
        $this->container->get('event_dispatcher')->dispatch(DataGridEvents::onMassAction, $event);
        
        return new JsonResponse($event->getExtraData());
    }
104782
def action_factory(name, parameter=False):
    
    if parameter:
        return partial(ParameterizedActionNeed, name)
    else:
        return ActionNeed(name)
589124
public function findNeedByName($name)
    {
        // No needs defined yet.
        if (is_null($this->needs)) {
            return null;
        }

        // Traverse and Return.
        return $this->traverseNodesAndFindBy('name', $name, $this->needs);
    }
411010
public function getActionParam($name, $default = null)
    {
        $params = $this->getActionParams();
        return isset($params[$name]) ? $params[$name] : $default;
    }
677275
public function get($name)
    {
        if (!$paramConfig = $this->methodRequirements[$name]) {
            return;
        }

        $config = new Credential($name, $paramConfig);

        if (true === $config->required && !($this->getRequest()->request->has($name))) {
            throw new BadRequestUserException(
                $this->formatError($name, false, 'The parameter must be set')
            );
        }

        $param = $this->getRequest()->request->get($name);

        if (false === $config->nullable && !$param) {
            throw new BadRequestUserException(
                $this->formatError($name, $param, 'The parameter cannot be null')
            );
        }

        if (($config->default && $param === $config->default
        || ($param === null && true === $config->nullable)
        || (null === $config->requirements))) {
            return $param;
        }

        $this->validateParam($config, $param);

        return $param;
    }
76517
protected function createComponentForm(string $name): Form
    {
        $form = new Form($this, $name);
        $form->setTranslator($this->translator);
        $this->formContainer->getForm($form);

        $form->onSuccess[] = $this->eventContainer;
        return $form;
    }
140613
public function findComponentByName($name)
    {
        if (isset($this->page->components[$name])) {
            return $this->page->components[$name];
        }

        if (isset($this->layout->components[$name])) {
            return $this->layout->components[$name];
        }

        $partialComponent = $this->partialStack->getComponent($name);
        if ($partialComponent !== null) {
            return $partialComponent;
        }

        return null;
    }
466185
public function getRootItemByName($name, $request)
    {
        $menus = $this->loadRoots($request);

        if (!isset($menus[$name])) {
            return null;
        }

        return $this->menuItemEntity->find($menus[$name][0]);
    }
869275
protected function createSelectWithConstraint($name)
    {
        return [explode(':', $name)[0], function ($query) use ($name) {
            $query->select(explode(',', explode(':', $name)[1]));
        }];
    }
626534
public static function getFunction(string $name)
    {
        return isset(self::$functions[$name]) ? self::$functions[$name] : null;
    }
558883
public function getRequiredOpt(string $name)
    {
        $val = $this->getOpt($name);
        if ($val === null) {
            throw new \InvalidArgumentException(sprintf('The option %s is required)', $name));
        }

        return $val;
    }
1061646
public function get($name)
    {
        if (! $this->has($name)) return null;

        $def = $this->components[$name];

        // already initialized.
        if (! $def instanceof ComponentDefine) {
            return $def;
        }

        // initialize.
        return $def->getInstance();
    }
63094
public function get(string $route, $action, ?string $name = null): Route
	{
		return $this->registerRoute(['GET', 'HEAD', 'OPTIONS'], $route, $action, $name);
	}
545200
public function getComponentByName($name)
    {
        foreach ($this->getComponents() as $component) {
            if ($component->getName() === $name) {
                return $component;
            }
        }
    }
1268178
public function getComponent($name)
	{
		if(isset($this->components[$name]) === false)
			throw new \OutOfBoundsException('The component with name "' . $name . '" does not exist');

		return $this->components[$name];
	}
731891
public function action($name = null)
    {
        if ($name) {
            $this->action = $name;
        }

        if ($this->action) {
            return $this->action;
        }

        // Wildcard
        return Route::currentRouteAction();
    }