public static function getPreviews($slug = null)
    {
        static::_initPreviews();

        if ($slug !== null) {
            if (isset(static::$_previews[$slug])) {
                return static::$_previews[$slug];
            }

            return [];
        }

        return static::$_previews;
    }
public static function getPreviews($slug = null)
    {
        static::_initPreviews();

        if ($slug !== null) {
            if (isset(static::$_previews[$slug])) {
                return static::$_previews[$slug];
            }

            return [];
        }

        return static::$_previews;
    }
public static function getPreviews ( $ slug = null ) { static :: _initPreviews ( ) ; if ( $ slug !== null ) { if ( isset ( static :: $ _previews [ $ slug ] ) ) { return static :: $ _previews [ $ slug ] ; } return [ ] ; } return static :: $ _previews ; }
Gets all defined previews, or information for an specific preview.

@param string $slug Slug of the preview for which get its info, set to null
will retrieve info for all registered previews
@return array
Gets all defined previews or information for an specific preview .