src/Gzero/Api/Transformer/WidgetTransformer.php
public function transform($widget)
    {
        $widget = $this->entityToArray(Widget::class, $widget);
        return [
            'id'          => (int) $widget['id'],
            'name'        => $widget['name'],
            'args'        => array_camel_case_keys($widget['args']),
            'isActive'    => (bool) $widget['is_active'],
            'isCacheable' => (bool) $widget['is_cacheable'],
            'createdAt'   => $widget['created_at'],
            'updatedAt'   => $widget['updated_at'],
        ];
    }
public function transform($widget)
    {
        $widget = $this->entityToArray(Widget::class, $widget);
        return [
            'id'          => (int) $widget['id'],
            'name'        => $widget['name'],
            'args'        => array_camel_case_keys($widget['args']),
            'isActive'    => (bool) $widget['is_active'],
            'isCacheable' => (bool) $widget['is_cacheable'],
            'createdAt'   => $widget['created_at'],
            'updatedAt'   => $widget['updated_at'],
        ];
    }
public function transform ( $ widget ) { $ widget = $ this -> entityToArray ( Widget :: class , $ widget ) ; return [ 'id' => ( int ) $ widget [ 'id' ] , 'name' => $ widget [ 'name' ] , 'args' => array_camel_case_keys ( $ widget [ 'args' ] ) , 'isActive' => ( bool ) $ widget [ 'is_active' ] , 'isCacheable' => ( bool ) $ widget [ 'is_cacheable' ] , 'createdAt' => $ widget [ 'created_at' ] , 'updatedAt' => $ widget [ 'updated_at' ] , ] ; }
Transforms widget entity

@param Widget|array $widget Widget entity

@return array
Transforms widget entity