/**
  * Adds an action.
  *
  * @param ActionInterface $action The action.
  */
 public function add(ActionInterface $action)
 {
     $this->actions[$action->getFullName()] = $action;
 }
    /**
     * Adds an action.
     *
     * @param ActionInterface $action An action.
     *
     * @throws \LogicException If the action is already in the collection.
     */
    public function add(ActionInterface $action)
    {
        if (isset($this->actions[$action->getFullName()])) {
            throw new \LogicException(sprintf('The action "%s" already exists.', $action->getFullName()));
        }

        $this->actions[$action->getFullName()] = $action;
    }