lib/Persistence/Doctrine/Handler/BlockHandler.php
private function createBlockCollectionsStatus(Block $block, int $newStatus): void
    {
        $collectionReferences = $this->loadCollectionReferences($block);

        foreach ($collectionReferences as $collectionReference) {
            $collection = $this->collectionHandler->loadCollection(
                $collectionReference->collectionId,
                $collectionReference->collectionStatus
            );

            $collection = $this->collectionHandler->createCollectionStatus(
                $collection,
                $newStatus
            );

            $newCollectionReference = CollectionReference::fromArray(
                [
                    'blockId' => $block->id,
                    'blockStatus' => $newStatus,
                    'collectionId' => $collection->id,
                    'collectionStatus' => $collection->status,
                    'identifier' => $collectionReference->identifier,
                ]
            );

            $this->queryHandler->createCollectionReference($newCollectionReference);
        }
    }
private function createBlockCollectionsStatus(Block $block, int $newStatus): void
    {
        $collectionReferences = $this->loadCollectionReferences($block);

        foreach ($collectionReferences as $collectionReference) {
            $collection = $this->collectionHandler->loadCollection(
                $collectionReference->collectionId,
                $collectionReference->collectionStatus
            );

            $collection = $this->collectionHandler->createCollectionStatus(
                $collection,
                $newStatus
            );

            $newCollectionReference = CollectionReference::fromArray(
                [
                    'blockId' => $block->id,
                    'blockStatus' => $newStatus,
                    'collectionId' => $collection->id,
                    'collectionStatus' => $collection->status,
                    'identifier' => $collectionReference->identifier,
                ]
            );

            $this->queryHandler->createCollectionReference($newCollectionReference);
        }
    }
private function createBlockCollectionsStatus ( Block $ block , int $ newStatus ) : void { $ collectionReferences = $ this -> loadCollectionReferences ( $ block ) ; foreach ( $ collectionReferences as $ collectionReference ) { $ collection = $ this -> collectionHandler -> loadCollection ( $ collectionReference -> collectionId , $ collectionReference -> collectionStatus ) ; $ collection = $ this -> collectionHandler -> createCollectionStatus ( $ collection , $ newStatus ) ; $ newCollectionReference = CollectionReference :: fromArray ( [ 'blockId' => $ block -> id , 'blockStatus' => $ newStatus , 'collectionId' => $ collection -> id , 'collectionStatus' => $ collection -> status , 'identifier' => $ collectionReference -> identifier , ] ) ; $ this -> queryHandler -> createCollectionReference ( $ newCollectionReference ) ; } }
Creates a new status for all collections in specified block.

This method does not create new status for sub-block collections,
so any process that works with this method needs to take care of that.
Creates a new status for all collections in specified block .