lib/Persistence/Doctrine/QueryHandler/BlockQueryHandler.php
public function loadChildBlocksData(Block $block, ?string $placeholder = null): array
    {
        $query = $this->getBlockSelectQuery();
        $query->where(
            $query->expr()->eq('b.parent_id', ':parent_id')
        )
        ->setParameter('parent_id', $block->id, Type::INTEGER)
        ->addOrderBy('b.placeholder', 'ASC')
        ->addOrderBy('b.position', 'ASC');

        if ($placeholder !== null) {
            $query->andWhere(
                $query->expr()->eq('b.placeholder', ':placeholder')
            )
            ->setParameter('placeholder', $placeholder, Type::STRING);
        }

        $this->applyStatusCondition($query, $block->status, 'b.status');

        return $query->execute()->fetchAll(PDO::FETCH_ASSOC);
    }
public function loadChildBlocksData(Block $block, ?string $placeholder = null): array
    {
        $query = $this->getBlockSelectQuery();
        $query->where(
            $query->expr()->eq('b.parent_id', ':parent_id')
        )
        ->setParameter('parent_id', $block->id, Type::INTEGER)
        ->addOrderBy('b.placeholder', 'ASC')
        ->addOrderBy('b.position', 'ASC');

        if ($placeholder !== null) {
            $query->andWhere(
                $query->expr()->eq('b.placeholder', ':placeholder')
            )
            ->setParameter('placeholder', $placeholder, Type::STRING);
        }

        $this->applyStatusCondition($query, $block->status, 'b.status');

        return $query->execute()->fetchAll(PDO::FETCH_ASSOC);
    }
public function loadChildBlocksData ( Block $ block , ? string $ placeholder = null ) : array { $ query = $ this -> getBlockSelectQuery ( ) ; $ query -> where ( $ query -> expr ( ) -> eq ( 'b.parent_id' , ':parent_id' ) ) -> setParameter ( 'parent_id' , $ block -> id , Type :: INTEGER ) -> addOrderBy ( 'b.placeholder' , 'ASC' ) -> addOrderBy ( 'b.position' , 'ASC' ) ; if ( $ placeholder !== null ) { $ query -> andWhere ( $ query -> expr ( ) -> eq ( 'b.placeholder' , ':placeholder' ) ) -> setParameter ( 'placeholder' , $ placeholder , Type :: STRING ) ; } $ this -> applyStatusCondition ( $ query , $ block -> status , 'b.status' ) ; return $ query -> execute ( ) -> fetchAll ( PDO :: FETCH_ASSOC ) ; }
Loads all child block data from specified block, optionally filtered by placeholder.
Loads all child block data from specified block optionally filtered by placeholder .