lib/Persistence/Doctrine/QueryHandler/BlockQueryHandler.php
public function loadSubBlockIds($blockId, ?int $status = null): array
    {
        $query = $this->connection->createQueryBuilder();
        $query->select('DISTINCT id')
            ->from('ngbm_block')
            ->where(
                $query->expr()->like('path', ':path')
            )
            ->setParameter('path', '%/' . (int) $blockId . '/%', Type::STRING);

        if ($status !== null) {
            $this->applyStatusCondition($query, $status);
        }

        $result = $query->execute()->fetchAll(PDO::FETCH_ASSOC);

        return array_column($result, 'id');
    }
public function loadSubBlockIds($blockId, ?int $status = null): array
    {
        $query = $this->connection->createQueryBuilder();
        $query->select('DISTINCT id')
            ->from('ngbm_block')
            ->where(
                $query->expr()->like('path', ':path')
            )
            ->setParameter('path', '%/' . (int) $blockId . '/%', Type::STRING);

        if ($status !== null) {
            $this->applyStatusCondition($query, $status);
        }

        $result = $query->execute()->fetchAll(PDO::FETCH_ASSOC);

        return array_column($result, 'id');
    }
public function loadSubBlockIds ( $ blockId , ? int $ status = null ) : array { $ query = $ this -> connection -> createQueryBuilder ( ) ; $ query -> select ( 'DISTINCT id' ) -> from ( 'ngbm_block' ) -> where ( $ query -> expr ( ) -> like ( 'path' , ':path' ) ) -> setParameter ( 'path' , '%/' . ( int ) $ blockId . '/%' , Type :: STRING ) ; if ( $ status !== null ) { $ this -> applyStatusCondition ( $ query , $ status ) ; } $ result = $ query -> execute ( ) -> fetchAll ( PDO :: FETCH_ASSOC ) ; return array_column ( $ result , 'id' ) ; }
Loads all sub block IDs.

@param int|string $blockId
@param int $status

@return array
Loads all sub block IDs .