Gets the action of the name given.

@param string $name The action name

@throws \InvalidArgumentException when the given action not found in the entity

@return Action
165631
public function getAction($name)
    {
        foreach ($this->actions as $action) {
            if ($action->name() === $name) {
                return $action;
            }
        }

        throw new \InvalidArgumentException(
            sprintf('Action "%s" not found for "%s" entity', $name, $this->name)
        );
    }
1103158
public function getArgument($name) {
        if (!$this->definition->hasArgument($name)) {
            throw new \InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
        }

        return isset($this->arguments[$name]) ? $this->arguments[$name] : $this->definition->getArgument($name)
            ->getDefault();
    }
481212
public function getField($name)
    {
        if ($this->has($name)) {
            return $this->fields[$name];
        }

        throw new \InvalidArgumentException(
            'Field with name ['. $name .'] does not exist in class '.get_class($this)
        );
    }
821688
public function findRequest(string $name)
    {
        foreach ($this->actions as $action) {
            if ($action->getRequest()->getName() === $name) {
                return $action->getRequest();
            }
        }

        return null;
    }
190983
public function getOption(string $name)
    {
        if (!$this->options->offsetExists($name)) {
            throw new Exception\InvalidArgumentException("Option '$name' does not exists'");
        }

        return $this->options[$name];
    }
404564
public function getConnection($name = null)
    {
        $name = $name ?: $this->getDefaultConnectionName();

        if (!$this->connectionExists($name)) {
            throw new InvalidArgumentException(sprintf('Doctrine Connection named "%s" does not exist.', $name));
        }

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

        return $this->connectionsMap[$name] = $this->getService(
            $this->getConnectionBindingName($this->connections[$name])
        );
    }
409804
public function getProject($name)
    {
        if ( ! $this->hasProject($name) )
        {
            throw new \InvalidArgumentException("Project [$name] could not be found in [{$this->rootDir}]");
        }

        return $this->projects->get($name);
    }
379957
public function option(string $name)
    {
        if (!array_key_exists($name, $this->options))
            throw new \InvalidArgumentException("Unknown option '{$name}'");
        return $this->options[$name];
    }
513609
public function getClient(string $name = 'default')
    {
        if (!isset($this->clients[$name])) {
            throw new InvalidArgumentException("No client with name \"$name\"");
        }

        return $this->clients[$name];
    }
703397
public function _get($name)
    {
        $getMethod = 'get' . ucfirst($name);
        if (method_exists($this, $getMethod)) {
            return $this->$getMethod();
        }
        throw new \InvalidArgumentException(sprintf('Getter does not exist for "%s" property', $name));
    }
1117560
public function get($name)
    {
        if ($this->has($name)) {
            $code = $this->getCode($name);

            $this->elements[$code] = $this->resolve($this->elements[$code]);

            return $this->elements[$code];
        }

        throw new \InvalidArgumentException(sprintf('Element "%s" does not exist.', $name));
    }
1071376
public function get($name)
    {
        if (!isset($this->helpers[$name])) {
            throw new \InvalidArgumentException(sprintf('The helper "%s" is not defined.', $name));
        }

        return $this->helpers[$name];
    }
156434
public function get($name)
    {
        if (array_key_exists($name, $this->transformations)) {
            return $this->transformations[$name];
        }

        throw new \InvalidArgumentException(
            sprintf(
                'A image transformation transformation named "%s" does not exist.',
                $name
            )
        );
    }
714966
public function getNamedRoute(string $name) : Route
    {
        $this->buildNameIndex();

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

        throw new InvalidArgumentException(sprintf('No route of the name (%s) exists', $name));
    }
1227502
public function getRequiredAction($name)
    {
        $result = null;
        $actions = $this->getOption(self::OPTION_REQUIRED_ACTIONS);
        foreach ($actions as $action) {
            if ($action->getName() === $name) {
                $result = $action;
                break;
            }
        }
        return $result;
    }
342647
public function getOption($name) {
    if (!array_key_exists($name, $this->options)) {
      throw new InvalidArgumentException(sprintf('Undefined option: "%s"', $name));
    }

    return $this->options[$name];
  }
1130018
public function getRule($name)
    {
        if ($this->hasRule($name)) {
            return $this->rules[$name];
        }

        throw new \InvalidArgumentException(sprintf('No rule with name "%s" could be found', $name));
    }