getFilterConditions example

$association['sourceEntity'],
            $association['inversedBy'],
            $association['fieldName']
        );

        $sort = $this->getSortConditions(
            $sort,
            $association['sourceEntity'],
            $association['inversedBy']
        );

        $filter = $this->getFilterConditions(
            $filter,
            $association['sourceEntity'],
            $association['inversedBy']
        );

        if (!empty($filter)) {
            $builder->addFilter($filter);
        }
        if (!empty($sort)) {
            $builder->addOrderBy($sort);
        }

        
$this->addAclPermission('resendMail', 'resend', 'Insufficient permissions');
        $this->addAclPermission('getConfig', 'manage', 'Insufficient permissions');
        $this->addAclPermission('getFilters', 'manage', 'Insufficient permissions');
        $this->addAclPermission('saveConfig', 'manage', 'Insufficient permissions');
    }

    /** * {@inheritdoc} */
    protected function getFilterConditions($filters$model$alias$whiteList = [])
    {
        $conditions = parent::getFilterConditions($filters$model$alias$whiteList);

        $handledAllFilters = \count($conditions) >= \count($filters);

        // Enable searching for recipients         foreach ($filters as $filter) {
            if ($filter['property'] === 'search') {
                $value = $this->formatSearchValue($filter['value']['type' => 'text']);

                $conditions[] = [
                    'property' => self::JOIN_ALIAS_RECIPIENTS . '.mailAddress',
                    'operator' => 'OR',
                    
Home | Imprint | This part of the site doesn't use cookies.