Enables a filter from the collection.

@param string $name Name of the filter.

@return SQLFilter The enabled filter.

@throws InvalidArgumentException If the filter does not exist.
496060
public function enable($name)
    {
        if (! $this->has($name)) {
            throw new InvalidArgumentException("Filter '" . $name . "' does not exist.");
        }

        if (! $this->isEnabled($name)) {
            $filterClass = $this->config->getFilterClassName($name);

            $this->enabledFilters[$name] = new $filterClass($this->em);

            // Keep the enabled filters sorted for the hash
            ksort($this->enabledFilters);

            // Now the filter collection is dirty
            $this->filtersState = self::FILTERS_STATE_DIRTY;
        }

        return $this->enabledFilters[$name];
    }
965
public function getRouteDefinitionByName(string $name): RouteDefinition
    {
        if (!isset($this->routesByName[$name])) {
            throw new \InvalidArgumentException("Invalid route name '$name'");
        }

        return $this->getRouteDefinition($this->routesByName[$name]);
    }
293972
public function connection($name = null)
    {
        if (is_null($name)) {
            $name = $this->getDefaultConnection();
        }

        if (! isset($this->connections[$name])) {
            throw new InvalidArgumentException("Connection [{$name}] is not registered.");
        }

        return $this->connections[$name];
    }
502369
protected function getRequiredParameter($name)
    {
        if(!array_key_exists($name, $this->params))
            throw new FiltererException('Required parameter ['.$name.'] is missing on filter call ['.$this->currentFilter.']');

        return $this->params[$name];
    }
396706
public function getFilter($name, $need = TRUE)
    {
        return $this->hasFilters()
            ? $this->getComponent(Filter::ID)->getComponent(Helpers::formatColumnName($name), $need)
            : NULL;
    }
719998
public function disable(string $name) : BsonFilter
    {
        // Get the filter to return it
        $filter = $this->getFilter($name);

        unset($this->enabledFilters[$name]);

        return $filter;
    }
143977
public function getProvider($name)
    {
        if (!isset($this->providers[$name])) {
            throw new \InvalidArgumentException(sprintf(
                'Unknown provider "%s", registered reindex providers: "%s"',
                $name, implode('", "', array_keys($this->providers))
            ));
        }

        return $this->providers[$name];
    }
8710
final public function removeColumn(string $name): Index
    {
        if (!$this->hasColumn($name)) {
            throw new InvalidArgumentException('Index not contains the column '.$name);
        }

        $this->columns = array_filter(
            $this->columns,
            function (IndexColumn $indexColumn) use ($name) {
                $column = $indexColumn->getColumn();

                return (bool) ($column::getName() !== $name);
            }
        );

        return $this;
    }
1264602
protected function resolve($name)
    {
        $config = $this->disks[$name];
        if (isset($config['class'])) {
            return Yii::createObject($config);
        } else if (isset($config['adapter'])) {
            $driverMethod = 'create' . ucfirst($config['adapter']) . 'Adapter';
            if (method_exists($this, $driverMethod)) {
                return $this->{$driverMethod}($config);
            } else {
                throw new InvalidArgumentException("Adapter [{$config['adapter']}] is not supported.");
            }
        } else {
            throw new InvalidArgumentException("Wrong adapter configuration.");
        }
    }
255194
public function setFilter($name, $filter)
    {
        if (!(
            is_callable($filter) ||
            class_exists($filter) ||
            method_exists($filter, 'parse')
        )) {
            throw new InvalidArgumentException(
                'Invalid ' . $name . ' filter given: ' .
                'it must be a callable or a class name.'
            );
        }

        return $this->getCompiler()->setFilter($name, $filter);
    }
336996
public function removeFilterOption($name)
    {
        $this->filterOptions->remove($this->filterOptions->find('name', $name));
        return $this;
    }
834637
public function create(string $name)
    {
        if ($this->locator->has($name)) {
            return $this->locator->get($name);
        }

        throw new \Exception(\sprintf('Filter "%s" was not found.', $name));
    }
741592
public function withFilter(string $name, FilterInterface $filter): Form
    {
        if (! isset($this->filters[$name])) {
            $this->filters[$name] = [];
        }

        $this->filters[$name][] = $filter;

        return $this;
    }
1047963
protected function configuration($name)
    {
        $name = $name ?: $this->getDefaultConnection();

        // To get the database connection configuration, we will just pull each of the
        // connection configurations and get the configurations for the given name.
        // If the configuration doesn't exist, we'll throw an exception and bail.
        $connections = $this->container['config']['database.connections']->toArray();

        if (is_null($config = Arr::get($connections, $name))) {
            throw new InvalidArgumentException("Database [$name] not configured.");
        }

        return $config;
    }
1223878
public function getPermission($name)
    {
        if ($this->hasPermission($name)) {
            return $this->permissions[$name];
        }

        throw new \InvalidArgumentException(sprintf('No permission with name "%s" could be found', $name));
    }
1117806
public function enable($name = null)
	{
		// Check if it exists. if not, bail out
		if ( ! $this->field($name))
		{
			throw new \RuntimeException('Field "'.$name.'" does not exist in this Fieldset.');
		}

		if (isset($this->disabled[$name]))
		{
			unset($this->disabled[$name]);
		}

		return $this;
	}
380331
public function getFilter($name)
	{
		if (!isset(self::$filters[$name]))
		{
			$class = $this->getFilterClass($name);
			self::$filters[$name] = new $class;
			self::$filters[$name]->setPipeline($this);
		}
		
		return self::$filters[$name];
	}