Sets action

@param string $action action string

@return $this
774635
public function setAction($action)
    {
        $allowedValues = $this->getActionAllowableValues();
        if (!in_array($action, $allowedValues)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'action', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['action'] = $action;

        return $this;
    }
970111
public function setAction($action)
    {
        if ($action instanceof Closure)
        {
            $this->action = $action;
            return;
        }
        else if (is_array($action) && is_callable($action))
        {
            $this->action = $action;
            return;
        }
        else if (strpos($action, '::') > 0)
        {
            $this->action = explode('::', $action);
            return;
        }

        $names = explode('.', $action);
        if (count($names) > 1) {
            $controller = array_shift($names);
            $action = array_shift($names);
            $this->setController($controller);
        } else {
            $action = array_shift($names);
        }
        $this->action = $action;
    }
344953
public function appendAction(FrenchFrogs\Form\Element\Button $action)
    {
        $this->actions[] = $action;
        return $this;
    }
1044189
public function setAction($action,$isAjax = true){
        $this->action = $action;
       foreach($this->suggestCells as $cell){
               $cell->setAjaxElement($isAjax);
           $cell->setAction($action);
       }
    }
1057843
public function setActions($actions)
    {
        if ($this->getState() != self::INIT) {
            throw new \RuntimeException('Invalid state.');
        }

        if (count($actions) == 0) {
            $this->setState(self::INVALID);
            throw new \RuntimeException('No actions given.');
        }

        $this->actions = array_combine($actions, $actions);
        $this->setState(self::REGISTER);

        return $this;
    }
358308
public function setAction(string $action = ''): ButtonInterface
    {
        if ($this->isVisibility()) {
            $this->action = $action;
        }

        return $this;
    }
400604
public function setAction(string $action)
    {
        if (!empty($action) && $this->policy === Rule::NOINHERIT)
            throw new Exception("Rule::NOINHERIT can not be used in combination with an action");

        $action = (string)$action;
        if ($action !== $this->action)
        {
            $validator = $this->acl->getActionValidator();
            if (null !== $validator)
            {
                if (($reason = $validator->isValid($action)) !== true)
                    throw new Exception("Action can not be validated: " . $reason);
            }
            $this->changed = true;
            $this->action = $action;
        }
    }
611987
public function setListActions(array $actions)
    {
        foreach ($actions as $key => $action) {
            $this->addListAction($key, $action);
        }

        return $this;
    }
1038604
public function setAction($action)
    {
        $context = $this->_context;

        $context->action = lcfirst(Text::camelize($action));

        return $this;
    }
1124875
public function setAction($action) {
        if (!is_string($action) || empty($action)) {
            $errMessage = "The action value must be a string and not be empty";
            throw new \InvalidArgumentException($errMessage, GeneralErrors::VALUE_IS_NOT_OF_EXPECTED_TYPE);
        }

        $this->action = $action;
    }
1094752
public function withAction(string $action): self
    {
        $this->action = AuditActionEnum::ensureValid($action);
        return $this;
    }
649755
public function persistState($action)
    {
        $state = $this->getRequest();

        // Built the session identifier based on the action
        $identifier = $this->_mixer->getIdentifier().'.'.$action;

        //Set the state in the session
        AnRequest::set('session.'.$identifier, AnConfig::unbox($state));
    }
1251271
public function addAction($action)
    {
        if ($action instanceof AttachmentAction) {
            $this->actions[] = $action;

            return $this;
        } elseif (is_array($action)) {
            $this->actions[] = new AttachmentAction($action);

            return $this;
        }

        throw new InvalidArgumentException('The attachment action must be an instance of jeremykenedy\Slack\AttachmentAction or a keyed array');
    }
937746
public function setActionName($value)
        {
            $this->_action = $value;
            /**
             * @see ZF-3465
             */
            if (null === $value) {
                $this->setParam($this->getActionKey(), $value);
            }
            return $this;
        }
1243972
public function setAction($action)
    {
        if (!in_array($action, $this->acceptedValues)) {
            $acceptedValuesString = implode(', ', $this->acceptedValues);
            throw new \Parable\ORM\Exception("Invalid action set, only {$acceptedValuesString} are allowed.");
        }
        $this->action = $action;
        return $this;
    }
1024730
public function addAction(ActionSchema $action) {
		$action->setPackage($this->package);
		$this->actions->set($action->getName(), $action);
		return $this;
	}
293227
protected function _setActions($actions)
    {
        return (new Collection($actions))->map(function ($value) {
            $options = (array)$value->get('options') + ['class' => ['btn btn-default']];
            $value->set('options', $options);

            return $value;
        })->toArray();
    }