lib/Core/Mapper/LayoutMapper.php
public function mapZone(PersistenceZone $zone): Zone
    {
        $zoneData = [
            'identifier' => $zone->identifier,
            'layoutId' => $zone->layoutId,
            'status' => $zone->status,
            'linkedZone' => function () use ($zone): ?Zone {
                if ($zone->linkedLayoutId === null || $zone->linkedZoneIdentifier === null) {
                    return null;
                }

                try {
                    // We're always using published versions of linked zones
                    $linkedZone = $this->layoutHandler->loadZone(
                        $zone->linkedLayoutId,
                        PersistenceValue::STATUS_PUBLISHED,
                        $zone->linkedZoneIdentifier
                    );

                    return $this->mapZone($linkedZone);
                } catch (NotFoundException $e) {
                    return null;
                }
            },
        ];

        return Zone::fromArray($zoneData);
    }
public function mapZone(PersistenceZone $zone): Zone
    {
        $zoneData = [
            'identifier' => $zone->identifier,
            'layoutId' => $zone->layoutId,
            'status' => $zone->status,
            'linkedZone' => function () use ($zone): ?Zone {
                if ($zone->linkedLayoutId === null || $zone->linkedZoneIdentifier === null) {
                    return null;
                }

                try {
                    // We're always using published versions of linked zones
                    $linkedZone = $this->layoutHandler->loadZone(
                        $zone->linkedLayoutId,
                        PersistenceValue::STATUS_PUBLISHED,
                        $zone->linkedZoneIdentifier
                    );

                    return $this->mapZone($linkedZone);
                } catch (NotFoundException $e) {
                    return null;
                }
            },
        ];

        return Zone::fromArray($zoneData);
    }
public function mapZone ( PersistenceZone $ zone ) : Zone { $ zoneData = [ 'identifier' => $ zone -> identifier , 'layoutId' => $ zone -> layoutId , 'status' => $ zone -> status , 'linkedZone' => function ( ) use ( $ zone ) : ? Zone { if ( $ zone -> linkedLayoutId === null || $ zone -> linkedZoneIdentifier === null ) { return null ; } try { // We're always using published versions of linked zones $ linkedZone = $ this -> layoutHandler -> loadZone ( $ zone -> linkedLayoutId , PersistenceValue :: STATUS_PUBLISHED , $ zone -> linkedZoneIdentifier ) ; return $ this -> mapZone ( $ linkedZone ) ; } catch ( NotFoundException $ e ) { return null ; } } , ] ; return Zone :: fromArray ( $ zoneData ) ; }
Builds the API zone value from persistence one.
Builds the API zone value from persistence one .