src/Gzero/Api/Transformer/BlockTransformer.php
public function transform($block)
    {
        $block = $this->entityToArray(Block::class, $block);
        return [
            'id'          => $this->setNullableValue($block['id']),
            'type'        => $block['type'],
            'region'      => $block['region'],
            'filter'      => $block['filter'],
            'options'     => $block['options'],
            'theme'       => $block['theme'],
            'weight'      => (int) $block['weight'],
            'isActive'    => (bool) $block['is_active'],
            'isCacheable' => (bool) $block['is_cacheable'],
            'createdAt'   => $block['created_at'],
            'updatedAt'   => $block['updated_at']
        ];
    }
public function transform($block)
    {
        $block = $this->entityToArray(Block::class, $block);
        return [
            'id'          => $this->setNullableValue($block['id']),
            'type'        => $block['type'],
            'region'      => $block['region'],
            'filter'      => $block['filter'],
            'options'     => $block['options'],
            'theme'       => $block['theme'],
            'weight'      => (int) $block['weight'],
            'isActive'    => (bool) $block['is_active'],
            'isCacheable' => (bool) $block['is_cacheable'],
            'createdAt'   => $block['created_at'],
            'updatedAt'   => $block['updated_at']
        ];
    }
public function transform ( $ block ) { $ block = $ this -> entityToArray ( Block :: class , $ block ) ; return [ 'id' => $ this -> setNullableValue ( $ block [ 'id' ] ) , 'type' => $ block [ 'type' ] , 'region' => $ block [ 'region' ] , 'filter' => $ block [ 'filter' ] , 'options' => $ block [ 'options' ] , 'theme' => $ block [ 'theme' ] , 'weight' => ( int ) $ block [ 'weight' ] , 'isActive' => ( bool ) $ block [ 'is_active' ] , 'isCacheable' => ( bool ) $ block [ 'is_cacheable' ] , 'createdAt' => $ block [ 'created_at' ] , 'updatedAt' => $ block [ 'updated_at' ] ] ; }
Transforms block entity

@param Block|array $block Block entity

@return array
Transforms block entity