Применяет группировку по первичному ключу коллекции
@param ISelectBuilder $selectBuilder
@return $this
966682
protected function applyGroupByCollectionPk(ISelectBuilder $selectBuilder)
    {
        $sourceAlias = $this->collection->getSourceAlias();
        $column = $sourceAlias . self::FIELD_SEPARATOR . $this->collection->getIdentifyField()
                ->getColumnName();
        $selectBuilder->groupBy($column);

        return $this;
    }
903672
protected function applyBetweenCondition(ISelectBuilder $selectBuilder)
    {
        list($minValue, $maxValue) = $this->expression;

        $minPlaceholder = $this->placeholder . ISelector::PLACEHOLDER_SEPARATOR . 'min';
        $maxPlaceholder = $this->placeholder . ISelector::PLACEHOLDER_SEPARATOR . 'max';

        $selectBuilder->begin()
            ->expr($this->fieldColumn, IFieldCondition::OPERATOR_EQMORE, $minPlaceholder)
            ->expr($this->fieldColumn, IFieldCondition::OPERATOR_EQLESS, $maxPlaceholder)
            ->bindValue($minPlaceholder, $minValue, $this->field->getDataType())
            ->bindValue($maxPlaceholder, $maxValue, $this->field->getDataType())
            ->end();

        return $this;
    }
696282
public function setBuilder($group, ServiceBuilder $builder)
    {
        $this[$group] = $builder;
        $this->removed[$group] = array();
        return $this;
    }
493382
public function buildForm(FormBuilderInterface $builder, array $options): void
    {
        // Get the context and membership provider to pass into transformer.
        $context = $this->production_context;
        $provider = $this->membership_provider;

        $builder
            ->add('optional', null, [
                'label' => 'invitation.form.optional',
            ])
            ->add('invitee', ChoiceType::class, [
                'label' => 'invitation.form.invitee',
                'placeholder' => 'invitation.form.choose_invitee',
                'choice_translation_domain' => false,

                // Load all active memberships for a production as choices.
                'choice_loader' => new CallbackChoiceLoader(function () use ($context, $provider) {
                    foreach ($provider->loadActiveMembershipsByProduction($context->getContext()) as $membership) {
                        $member = $membership->getMember();
                        yield $member->__toString() => $member->getUsername();
                    }
                }),
            ])
        ;
    }
643930
protected function addBIC(FormBuilderInterface $builder)
    {
        $builder->add(
            self::FIELD_BIC,
            TextType::class,
            [
                'label' => false,
                'required' => true,
                'constraints' => [
                    $this->createManageMandateConstraint(),
                ],
            ]
        );

        return $this;
    }
661065
protected function addBankBranchCode(FormBuilderInterface $builder)
    {
        $builder->add(
            static::FIELD_BANK_BRANCH_CODE,
            TextType::class,
            [
                'label' => false,
                'required' => true,
                'constraints' => [
                ],
            ]
        );

        return $this;
    }
539552
protected function addJoinTablesToQueryBuilder(QueryBuilder $queryBuilder)
    {
        $objectManager = $this->getObjectManager();
        $entityAlias   = $this->getEntityClassAlias();
        $classMetaData = $objectManager->getClassMetadata($this->getEntityClass());

        $assocMappings = $classMetaData->getAssociationMappings();

        foreach ($assocMappings as $fieldName => $assocMapping) {
            $join  = $entityAlias . '.' . $fieldName;
            $alias = self::JOIN_ALIAS_PREFIX . $fieldName;

            $queryBuilder->addSelect($alias);
            $queryBuilder->leftJoin($join, $alias);
        }
    }
550831
public function _UpdateQueryBuilder(Builder $objBuilder)
    {
        $intLength = count($this->objNodeArray);
        for ($intIndex = 0; $intIndex < $intLength; $intIndex++) {
            $objNode = $this->objNodeArray[$intIndex];
            if ($objNode instanceof Node\Virtual) {
                if ($objNode->hasSubquery()) {
                    throw new Caller('You cannot define a virtual node in an order by clause. You must use an Expand clause to define it.');
                }
                $strOrderByCommand = '__' . $objNode->getAttributeName();
            } elseif ($objNode instanceof Node\Column) {
                /** @var Node\Column $objNode */
                $strOrderByCommand = $objNode->getColumnAlias($objBuilder);
            } elseif ($objNode instanceof iCondition) {
                /** @var iCondition $objNode */
                $strOrderByCommand = $objNode->getWhereClause($objBuilder);
            } else {
                $strOrderByCommand = '';
            }

            // Check to see if they want a ASC/DESC declarator
            if ((($intIndex + 1) < $intLength) &&
                !($this->objNodeArray[$intIndex + 1] instanceof Node\NodeBase)
            ) {
                if ((!$this->objNodeArray[$intIndex + 1]) ||
                    (trim(strtolower($this->objNodeArray[$intIndex + 1])) == 'desc')
                ) {
                    $strOrderByCommand .= ' DESC';
                } else {
                    $strOrderByCommand .= ' ASC';
                }
                $intIndex++;
            }

            $objBuilder->addOrderByItem($strOrderByCommand);
        }
    }
649055
public function subquery( QueryBuilder $queryBuilder ) {
		$this->subqueries[] = $queryBuilder->getSPARQL( false );
		$this->usageValidator->trackDefinedVariables( implode( ' ', $queryBuilder->getSelects() ) );

		// @todo temp hack to add AS definitions to defined variables
		$regexHelper = new RegexHelper();
		$matches = $regexHelper->getMatches( 'AS \{variable}', implode( ' ', $queryBuilder->getSelects() ) );
		$this->usageValidator->trackDefinedVariables( $matches );

		return $this;
	}
907043
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($builder, $options) {
                if (empty($options['templates'])) {
                    return;
                }
                $event->getForm()->add('_template', ChoiceType::class, array(
                    'required' => true,
                    'choices' => $options['templates'],
                ));
            })
        ;
    }
1125347
public function extendQueryBuilder(QueryBuilder $queryBuilder)
    {
        $queryBuilder
            ->setFirstResult($this->getFirstResult())
            ->setMaxResults($this->getLimit());

        return $this;
    }
661193
protected function applyLimitConditions(ISelectBuilder $selectBuilder)
    {
        if ($this->limit) {
            $postfix = self::PLACEHOLDER_SEPARATOR . $this->collection->getName();

            $limitPlaceholder = ':limit' . $postfix;
            $offsetPlaceholder = ':offset' . $postfix;

            $selectBuilder
                ->limit($limitPlaceholder)
                ->bindInt($limitPlaceholder, $this->limit);
            if ($this->offset) {
                $selectBuilder
                    ->offset($offsetPlaceholder)
                    ->bindInt($offsetPlaceholder, $this->offset);
            }
        }
    }
1008868
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $this->addCardType($builder, $options)
            ->addNameOnCard($builder)
            ->addHiddenInputs($builder);
    }
1249005
protected function applyColumnMapper(ModelQueryBuilder $builder): self
    {
        if ($this->hasColumnMapper() === true) {
            $builder->setColumnToDatabaseMapper($this->getColumnMapper());
        }

        return $this;
    }
14883
private function setSelectFrom()
    {
        foreach ($this->selectColumns as $key => $value) {
            $this->qb->addSelect($key);
        }

        $this->qb->from($this->entity, $this->tableName);

        return $this;
    }
950190
public function SqlBuilder()
    {
        if (!$this->builder)
            $this->builder = new Sql\Builder($this->Connection());
        
        return $this->builder;
    }
158474
public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->addModelTransformer($this)
            ->add('name', TextType::class, array())
            ->add('online', ChoiceType::class, array(
                'expanded' => true,
                'multiple' => false,
                'choices' => array(
                    'Yes' => true,
                    'No' => false,
                ),
            ))
            ->add('meta', MetadataType::class, array(
                'label' => false,
                'supported_metadata' => array('title', 'description', 'keywords'),
            ))
            ->add('submit', SubmitType::class)
        ;
    }