public function getStyleguideObjectsFromFusionAst($fusionAst)
    {
        $styleguideObjects = [];
        if ($fusionAst && $fusionAst['__prototypes']) {
            foreach ($fusionAst['__prototypes'] as $prototypeFullName => $prototypeObject) {
                if (array_key_exists('__meta', $prototypeObject) && is_array($prototypeObject['__meta']) && array_key_exists('styleguide', $prototypeObject['__meta'])) {
                    list($prototypeVendor, $prototypeName) = explode(':', $prototypeFullName, 2);
                    $styleguideConfiguration = $prototypeObject['__meta']['styleguide'];
                    $styleguideObjects[$prototypeFullName] = [
                        'title' => (isset($styleguideConfiguration['title'])) ? $styleguideConfiguration['title'] : implode(' ', array_reverse(explode('.', $prototypeName))),
                        'path' => (isset($styleguideConfiguration['path'])) ? $styleguideConfiguration['path'] : $prototypeName,
                        'description' => (isset($styleguideConfiguration['description'])) ? $styleguideConfiguration['description'] :  '',
                        'options' => (isset($styleguideConfiguration['options'])) ? $styleguideConfiguration['options'] : null,
                    ];
                }
            }
        }
        return $styleguideObjects;
    }
public function getStyleguideObjectsFromFusionAst($fusionAst)
    {
        $styleguideObjects = [];
        if ($fusionAst && $fusionAst['__prototypes']) {
            foreach ($fusionAst['__prototypes'] as $prototypeFullName => $prototypeObject) {
                if (array_key_exists('__meta', $prototypeObject) && is_array($prototypeObject['__meta']) && array_key_exists('styleguide', $prototypeObject['__meta'])) {
                    list($prototypeVendor, $prototypeName) = explode(':', $prototypeFullName, 2);
                    $styleguideConfiguration = $prototypeObject['__meta']['styleguide'];
                    $styleguideObjects[$prototypeFullName] = [
                        'title' => (isset($styleguideConfiguration['title'])) ? $styleguideConfiguration['title'] : implode(' ', array_reverse(explode('.', $prototypeName))),
                        'path' => (isset($styleguideConfiguration['path'])) ? $styleguideConfiguration['path'] : $prototypeName,
                        'description' => (isset($styleguideConfiguration['description'])) ? $styleguideConfiguration['description'] :  '',
                        'options' => (isset($styleguideConfiguration['options'])) ? $styleguideConfiguration['options'] : null,
                    ];
                }
            }
        }
        return $styleguideObjects;
    }
public function getStyleguideObjectsFromFusionAst ( $ fusionAst ) { $ styleguideObjects = [ ] ; if ( $ fusionAst && $ fusionAst [ '__prototypes' ] ) { foreach ( $ fusionAst [ '__prototypes' ] as $ prototypeFullName => $ prototypeObject ) { if ( array_key_exists ( '__meta' , $ prototypeObject ) && is_array ( $ prototypeObject [ '__meta' ] ) && array_key_exists ( 'styleguide' , $ prototypeObject [ '__meta' ] ) ) { list ( $ prototypeVendor , $ prototypeName ) = explode ( ':' , $ prototypeFullName , 2 ) ; $ styleguideConfiguration = $ prototypeObject [ '__meta' ] [ 'styleguide' ] ; $ styleguideObjects [ $ prototypeFullName ] = [ 'title' => ( isset ( $ styleguideConfiguration [ 'title' ] ) ) ? $ styleguideConfiguration [ 'title' ] : implode ( ' ' , array_reverse ( explode ( '.' , $ prototypeName ) ) ) , 'path' => ( isset ( $ styleguideConfiguration [ 'path' ] ) ) ? $ styleguideConfiguration [ 'path' ] : $ prototypeName , 'description' => ( isset ( $ styleguideConfiguration [ 'description' ] ) ) ? $ styleguideConfiguration [ 'description' ] : '' , 'options' => ( isset ( $ styleguideConfiguration [ 'options' ] ) ) ? $ styleguideConfiguration [ 'options' ] : null , ] ; } } } return $ styleguideObjects ; }
Get all styleguide objects for the given fusion-ast

@param array $fusionAst
@return array
Get all styleguide objects for the given fusion - ast