Task/ReportPluginData.php
function listPluginData($discovery_type = NULL) {
    // We may come here several times, so cache this.
    // TODO: look into finer-grained caching higher up.
    static $cache;

    if (isset($cache[$discovery_type])) {
      return $cache[$discovery_type];
    }

    $plugin_data = $this->environment->getStorage()->retrieve('plugins');

    // Filter the plugins by the discovery type.
    if ($discovery_type) {
      $plugin_data = array_filter($plugin_data, function($item) use ($discovery_type) {
        $discovery_pieces = explode('\\', $item['discovery']);
        $discovery_short_name = array_pop($discovery_pieces);

        return ($discovery_short_name == $discovery_type);
      });
    }

    $cache[$discovery_type] = $plugin_data;

    return $plugin_data;
  }
function listPluginData($discovery_type = NULL) {
    // We may come here several times, so cache this.
    // TODO: look into finer-grained caching higher up.
    static $cache;

    if (isset($cache[$discovery_type])) {
      return $cache[$discovery_type];
    }

    $plugin_data = $this->environment->getStorage()->retrieve('plugins');

    // Filter the plugins by the discovery type.
    if ($discovery_type) {
      $plugin_data = array_filter($plugin_data, function($item) use ($discovery_type) {
        $discovery_pieces = explode('\\', $item['discovery']);
        $discovery_short_name = array_pop($discovery_pieces);

        return ($discovery_short_name == $discovery_type);
      });
    }

    $cache[$discovery_type] = $plugin_data;

    return $plugin_data;
  }
function listPluginData ( $ discovery_type = NULL ) { // We may come here several times, so cache this. // TODO: look into finer-grained caching higher up. static $ cache ; if ( isset ( $ cache [ $ discovery_type ] ) ) { return $ cache [ $ discovery_type ] ; } $ plugin_data = $ this -> environment -> getStorage ( ) -> retrieve ( 'plugins' ) ; // Filter the plugins by the discovery type. if ( $ discovery_type ) { $ plugin_data = array_filter ( $ plugin_data , function ( $ item ) use ( $ discovery_type ) { $ discovery_pieces = explode ( '\\' , $ item [ 'discovery' ] ) ; $ discovery_short_name = array_pop ( $ discovery_pieces ) ; return ( $ discovery_short_name == $ discovery_type ) ; } ) ; } $ cache [ $ discovery_type ] = $ plugin_data ; return $ plugin_data ; }
Get the list of plugin data.

@param $discovery_type
(optional) The short name of a discovery class to limit the plugin list
by. Possible values include:
- AnnotatedClassDiscovery
- YamlDiscovery

@return
The processed plugin data.

@see \DrupalCodeBuilder\Task\Collect8::gatherPluginTypeInfo()
Get the list of plugin data .