original_string: public static function getPreviews($slug = null)
      {
          static::_initPreviews();
  
          if ($slug !== null) {
              if (isset(static::$_previews[$slug])) {
                  return static::$_previews[$slug];
              }
  
              return [];
          }
  
          return static::$_previews;
      }
code: public static function getPreviews($slug = null)
      {
          static::_initPreviews();
  
          if ($slug !== null) {
              if (isset(static::$_previews[$slug])) {
                  return static::$_previews[$slug];
              }
  
              return [];
          }
  
          return static::$_previews;
      }
code_tokens: public static function getPreviews ( $ slug = null ) { static :: _initPreviews ( ) ; if ( $ slug !== null ) { if ( isset ( static :: $ _previews [ $ slug ] ) ) { return static :: $ _previews [ $ slug ] ; } return [ ] ; } return static :: $ _previews ; }
docstring: 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
docstring_tokens: Gets all defined previews or information for an specific preview .