Disable/Enable the SQL Filters.

@param null|ObjectManager $om      The object manager instance
@param string             $action  The value (disable|enable)
@param string[]           $filters The list of SQL Filter
18947
protected static function actionFilters($om, $action, array $filters): void
    {
        if ($om instanceof EntityManagerInterface) {
            $sqlFilters = $om->getFilters();

            foreach ($filters as $name) {
                if ($sqlFilters->isEnabled($name)
                        && ($filter = $sqlFilters->getFilter($name)) instanceof EnableFilterInterface) {
                    $filter->{$action}();
                } else {
                    $sqlFilters->{$action}($name);
                }
            }
        }
    }
1195368
private static function determineFilterIsNullOrIsNotNull(array $filter, QueryBuilder $queryBuilder)
    {
        if (!\in_array($filter['operation'], ['IS NULL', 'IS NOT NULL'])) {
            return null;
        }

        return static::filterIsNullOrIsNotNull($filter, $queryBuilder);
    }
49453
public function withFilter(Filter $filter)
    {
        if ($this->value->isNull()) {
            return null;
        }

        return $this->applyFilter($filter);
    }
1071307
protected function addFilters($type, $filters)
	{
		if (isset($this->action[$type]))
		{
			$this->action[$type] .= '|'.$filters;
		}
		else
		{
			$this->action[$type] = $filters;
		}

		return $this;
	}
1323999
public function objectsList($filter = null, $params = null)
    {
        //====================================================================//
        // Stack Trace
        Splash::log()->trace();

        //====================================================================//
        // Prepare Query Builder
        /** @var QueryBuilder $queryBuilder */
        $queryBuilder = $this->repository->createQueryBuilder('c');
        // Setup Results Offset
        if (isset($params['offset']) && is_int($params['offset'])) {
            $queryBuilder->setFirstResult($params['offset']);
        }
        // Limit Results Number
        if (isset($params['max']) && is_int($params['max'])) {
            $queryBuilder->setMaxResults($params['max']);
        }

        //====================================================================//
        // Add List Filters
        if (!empty($filter)) {
        }

        //====================================================================//
        // Load Objects List
        $rawData = $queryBuilder->getQuery()->getResult();

        //====================================================================//
        // Parse Data on Result Array
        $response = array();
        foreach ($rawData as $object) {
            $response[] = $this->getObjectListArray($object);
        }

        //====================================================================//
        // Parse Meta Infos on Result Array
        $response['meta'] = array(
            'total' => count($rawData),
            'current' => $this->getTotalCount(),
        );

        //====================================================================//
        // Return result
        return $response;
    }
578137
public function callAction(string $action, ?DataMap $params = null): void
    {
        list ($moduleName, $controllerName, $actionName) = $this->getFullAction($action);
        $this->routeInfo->moduleName = $moduleName;
        $this->routeInfo->controllerName = $controllerName;
        $this->routeInfo->actionName = $actionName;
        if ($params != null) {
            $this->routeInfo->params = $params;
        }
        $this->invokeRoute();
    }
1344337
protected function filterApplies($filter, $request, $method)
	{
		foreach (array('Only', 'Except', 'On') as $type)
		{
			if ($this->{"filterFails{$type}"}($filter, $request, $method))
			{
				return false;
			}
		}

		return true;
	}
951020
private static function actionExecutedFilters($actionContext, $actionResult, $exceptionContext = null) {
        $context = new ActionExecutedContext($actionContext, $actionResult, $exceptionContext);

        $filters = $actionContext->getFilters();

        foreach ($filters as $filter) {
            $filter->actionExecuted($context);
        }

        return $context;
    }
1350402
protected function runFilters($when, $action)
    {
        $when = "_{$when}";
        $filters = static::${$when};

        // Anything to do?
        if (array_key_exists($action, $filters)) {
            foreach ($filters[$action] as $method) {
                $this->{$method}();
            }
        }
    }
1252915
public function where($query, $queryParams = null, string $op = ''): self
    {
        if ($query == '') {
            throw new BuilderException('Query required!');
        }

        // sub-where
        if ($queryParams instanceof Builder) {
            // $opr argument is empty, should be exists in query (eg: id = )
            $query = $this->prepare($query, '', $queryParams);

            return $this->push('where', $query);
        }

        if (is_array($query)) {
            // eg: [['id' => ...], ...]
            foreach ($query as $field => $params) {
                // eg: ['id' => [1, '=', '?', 'or/and']], ['a.id' => [id('b.id'), ...]]
                if (is_array($params)) {
                    @ [$params, $operator, $escapeOperator, $op] = (array) $params;
                    if ($operator == null) {
                        $operator = '='; // @default=equal
                    }
                    $query = '?? '. $operator .' '. ($params instanceof Identifier ? '??' : $escapeOperator ?: '?');
                    $queryParams = [$field, $params];
                } else {
                    // eg: ['id' => 1]
                    $query = '?? = '. ($params instanceof Identifier ? '??' : '?');
                    $queryParams = [$field, $params];
                }

                $op = $op ? strtoupper($op) : self::OP_AND;
                if ($op != self::OP_OR && $op != self::OP_AND) {
                    throw new BuilderException('Available ops: OR, AND');
                }

                $query = $this->agent->prepare($query, $queryParams);

                $this->push('where', [[$query, $op]]);
            }

            return $this;
        }

        if (!is_string($query)) {
            throw new BuilderException(sprintf('String, array or Builder type queries are accepted only, %s given!',
                gettype($query)));
        }

        if ($queryParams !== null) {
            if (!is_array($queryParams) && !is_scalar($queryParams) && !($queryParams instanceof Identifier)) {
                throw new BuilderException(sprintf('Array, scalar and Query\Identifier params are accepted only, %s given!',
                    gettype($queryParams)));
            }
        }

        $query = $this->agent->prepare($query, $queryParams);

        $op = $op ? strtoupper($op) : self::OP_AND;
        if ($op != self::OP_OR && $op != self::OP_AND) {
            throw new BuilderException('Available ops: OR, AND');
        }

        return $this->push('where', [[$query, $op]]);
    }
743980
public function remove($action, $id = null)
    {
        /** @var $query \eZ\Publish\Core\Persistence\Database\DeleteQuery */
        $query = $this->dbHandler->createDeleteQuery();
        $query->deleteFrom(
            $this->dbHandler->quoteTable($this->table)
        )->where(
            $query->expr->eq(
                $this->dbHandler->quoteColumn('action'),
                $query->bindValue($action, null, \PDO::PARAM_STR)
            )
        );

        if ($id !== null) {
            $query->where(
                $query->expr->lAnd(
                    $query->expr->eq(
                        $this->dbHandler->quoteColumn('is_alias'),
                        $query->bindValue(0, null, \PDO::PARAM_INT)
                    ),
                    $query->expr->eq(
                        $this->dbHandler->quoteColumn('id'),
                        $query->bindValue($id, null, \PDO::PARAM_INT)
                    )
                )
            );
        }

        $query->prepare()->execute();
    }
134944
public function log_operations($action) {
		$type = 	$this->sql->escape($action->get_status());
		$dataId = 	$this->sql->escape($action->get_new_id());
		$user = 	$this->sql->escape($this->request->get_user());
		if ($type!="error" && $type!="invalid" && $type !="collision") {
            $action_mode = $this->request->get_action_mode();
            if(!empty($action_mode))
                $type .= "#".$action_mode;

			$this->log_update_action($this->table, $dataId, $type, $user);
		}
	}
1054063
protected function addFilters(Controller $controller, $action, Request $request, Route $route=null) {
		$controllerClass = get_class($controller);

		foreach($this->filters as $_filter) {
			$args = $_filter['args'];
			$filter = $_filter['filter'];

			if(isset($criteria)) {
				$criteria = $_filter['criteria'];
				if(isset($criteria['actions'])) {
					if(!is_string($action))
						continue;
					if($criteria['actions'] && strpos($controllerClass.':'.$action, $criteria['actions']) !== 0)
						continue;
				}
				if($route !== null && isset($criteria['route'])) {
					foreach($criteria['methods'] as $method) {
						if($criteria['route'] && strpos($route->getRoute(), $criteria['route']) !== 0 || strtoupper($method) !== $request->method())
							continue;
					}
				}
			}

			$reflector = new \ReflectionClass($filter);
			$controller->addFilter($reflector->newInstanceArgs($args));
		}

		foreach($this->beforeFilters as $_filter) {
			$filter = $_filter['filter'];

			if(isset($criteria)) {
				$criteria = $_filter['criteria'];
				if(isset($criteria['actions'])) {
					if(!is_string($action))
						continue;
					if($criteria['actions'] && strpos($controllerClass.':'.$action, $criteria['actions']) !== 0)
						continue;
				}
				if($route !== null && isset($criteria['route'])) {
					foreach($criteria['methods'] as $method) {
						if($criteria['route'] && strpos($route->getRoute(), $criteria['route']) !== 0 || strtoupper($method) !== $request->method())
							continue;
					}
				}
			}

			$controller->addBeforeFilter($filter);
		}

		foreach($this->afterFilters as $_filter) {
			$filter = $_filter['filter'];

			if(isset($criteria)) {
				$criteria = $_filter['criteria'];
				if(isset($criteria['actions'])) {
					if($criteria['actions'] && strpos($controllerClass.':'.$action, $criteria['actions']) !== 0)
						continue;
				}
				if($route !== null && isset($criteria['route'])) {
					foreach($criteria['methods'] as $method) {
						if($criteria['route'] && strpos($route->getRoute(), $criteria['route']) !== 0 || strtoupper($method) !== $request->method())
							continue;
					}
				}
			}

			$controller->addAfterFilter($filter);
		}
	}
370584
public function setOperator($operator)
    {
        if (! array_key_exists($operator, $this->sqlOperators)) {
            throw new FilterOperatorException("Operator [$operator] not found");
        }

        $this->operator = $operator;

        return $this;
    }
929005
public static tmformssoaction[] get_filtered(nitro_service service, String filter) throws Exception{
		tmformssoaction obj = new tmformssoaction();
		options option = new options();
		option.set_filter(filter);
		tmformssoaction[] response = (tmformssoaction[]) obj.getfiltered(service, option);
		return response;
	}
802911
@Override
    public void doFilter(ActionRequest request, ActionResponse response, FilterChain chain) throws IOException,
            PortletException {
        doCommonFilter(request, response, chain);
    }
1187516
protected function _isFilterEnabled()
    {
        if (!isset($this->controller->filterFields)) {
            return false;
        }

        foreach ($this->controller->filterFields as $field) {
            if (isset($field['actions']) &&
                is_array($field['actions']) &&
                in_array($this->action, $field['actions'])
            ) {
                return true;
            }
        }

        return false;
    }