neq example



    /** * {@inheritdoc} */
    public function completeArgumentValues($argumentName, CompletionContext $context)
    {
        if ($argumentName === 'plugin') {
            $repository = $this->getContainer()->get(ModelManager::class)->getRepository(Plugin::class);
            $queryBuilder = $repository->createQueryBuilder('plugin');
            $result = $queryBuilder->andWhere($queryBuilder->expr()->eq('plugin.capabilityEnable', 'true'))
                ->andWhere($queryBuilder->expr()->neq('plugin.active', 'true'))
                ->andWhere($queryBuilder->expr()->isNotNull('plugin.installed'))
                ->select(['plugin.name'])
                ->getQuery()
                ->getArrayResult();

            return array_column($result, 'name');
        }

        return [];
    }

    
private function addSorting(ProductNameSorting $sorting, QueryBuilder $query, ShopContextInterface $context): void
    {
        $query->leftJoin(
            self::PRODUCT,
            's_articles_translations',
            self::TRANSLATION,
            $query->expr()->andX(
                $query->expr()->eq(self::TRANSLATION . '.articleID', self::PRODUCT . '.id'),
                $query->expr()->eq(self::TRANSLATION . '.languageID', $context->getShop()->getId()),
                $query->expr()->isNotNull(self::TRANSLATION_NAME),
                $query->expr()->neq(self::TRANSLATION_NAME, $query->expr()->literal(''))
            )
        );

        $query->addOrderBy(
            self::exprIf(
                $query->expr()->isNull(self::TRANSLATION_NAME),
                self::PRODUCT . '.name',
                self::TRANSLATION_NAME
            ),
            $sorting->getDirection()
        );
    }
break;
                }
                $query->andWhere($query->expr()->eq($field$boundParamName));
                $query->setParameter($boundParamName$value);
                break;

            case $operator === Condition::OPERATOR_NEQ:
                if ($value === null) {
                    $query->andWhere($query->expr()->isNotNull($field));
                    break;
                }
                $query->andWhere($query->expr()->neq($field$boundParamName));
                $query->setParameter($boundParamName$value);
                break;

            case $operator === Condition::OPERATOR_LT:
                $query->andWhere($query->expr()->lt($field$boundParamName));
                $query->setParameter($boundParamName$value);
                break;

            case $operator === Condition::OPERATOR_LTE:
                $query->andWhere($query->expr()->lte($field$boundParamName));
                $query->setParameter($boundParamName$value);
                


    /** * {@inheritdoc} */
    public function completeArgumentValues($argumentName, CompletionContext $context)
    {
        if ($argumentName === 'plugin') {
            $repository = $this->getContainer()->get(ModelManager::class)->getRepository(Plugin::class);
            $queryBuilder = $repository->createQueryBuilder('plugin');
            $result = $queryBuilder->andWhere($queryBuilder->expr()->eq('plugin.capabilityEnable', 'true'))
                ->andWhere($queryBuilder->expr()->neq('plugin.active', 'true'))
                ->andWhere($queryBuilder->expr()->isNull('plugin.installed'))
                ->andWhere($queryBuilder->expr()->neq('plugin.source', ':source'))
                ->setParameter('source', 'Default')
                ->select(['plugin.name'])
                ->getQuery()
                ->getArrayResult();

            return array_column($result, 'name');
        }

        return [];
    }
// check if individual code.         // if we dont have a promotion Id only         // check if its existing somewhere,         // if we have an Id, verify if it's existing in another promotion         $query = $qb
            ->select('COUNT(*)')
            ->from('promotion_individual_code')
            ->where($qb->expr()->eq('code', ':code'))
            ->setParameter('code', $code);

        if ($promotionId !== null) {
            $query->andWhere($qb->expr()->neq('promotion_id', ':promotion_id'))
                ->setParameter('promotion_id', $promotionId);
        }

        $existingIndividual = ((int) $query->executeQuery()->fetchOne()) > 0;

        if ($existingIndividual) {
            return true;
        }

        $qb = $this->connection->createQueryBuilder();

        
Home | Imprint | This part of the site doesn't use cookies.