Task/Collect/PluginTypesCollector.php
protected function addPluginTypeServiceDataYaml(&$data, $service, $discovery) {
    $service_reflection = new \ReflectionClass($service);
    $property = $service_reflection->getProperty('defaults');
    $property->setAccessible(TRUE);
    $defaults = $property->getValue($service);

    // YAML plugins don't specify their ID; it's generated automatically.
    unset($defaults['id']);

    $data['yaml_properties'] = $defaults;

    // The YAML discovery wraps another discovery object.
    $discovery_reflection = new \ReflectionClass($discovery);
    $property = $discovery_reflection->getProperty('discovery');
    $property->setAccessible(TRUE);
    $wrapped_discovery = $property->getValue($discovery);

    $wrapped_discovery_reflection = new \ReflectionClass($wrapped_discovery);
    $property = $wrapped_discovery_reflection->getProperty('name');
    $property->setAccessible(TRUE);
    $name = $property->getValue($wrapped_discovery);

    $data['yaml_file_suffix'] = $name;
  }
protected function addPluginTypeServiceDataYaml(&$data, $service, $discovery) {
    $service_reflection = new \ReflectionClass($service);
    $property = $service_reflection->getProperty('defaults');
    $property->setAccessible(TRUE);
    $defaults = $property->getValue($service);

    // YAML plugins don't specify their ID; it's generated automatically.
    unset($defaults['id']);

    $data['yaml_properties'] = $defaults;

    // The YAML discovery wraps another discovery object.
    $discovery_reflection = new \ReflectionClass($discovery);
    $property = $discovery_reflection->getProperty('discovery');
    $property->setAccessible(TRUE);
    $wrapped_discovery = $property->getValue($discovery);

    $wrapped_discovery_reflection = new \ReflectionClass($wrapped_discovery);
    $property = $wrapped_discovery_reflection->getProperty('name');
    $property->setAccessible(TRUE);
    $name = $property->getValue($wrapped_discovery);

    $data['yaml_file_suffix'] = $name;
  }
protected function addPluginTypeServiceDataYaml ( & $ data , $ service , $ discovery ) { $ service_reflection = new \ ReflectionClass ( $ service ) ; $ property = $ service_reflection -> getProperty ( 'defaults' ) ; $ property -> setAccessible ( TRUE ) ; $ defaults = $ property -> getValue ( $ service ) ; // YAML plugins don't specify their ID; it's generated automatically. unset ( $ defaults [ 'id' ] ) ; $ data [ 'yaml_properties' ] = $ defaults ; // The YAML discovery wraps another discovery object. $ discovery_reflection = new \ ReflectionClass ( $ discovery ) ; $ property = $ discovery_reflection -> getProperty ( 'discovery' ) ; $ property -> setAccessible ( TRUE ) ; $ wrapped_discovery = $ property -> getValue ( $ discovery ) ; $ wrapped_discovery_reflection = new \ ReflectionClass ( $ wrapped_discovery ) ; $ property = $ wrapped_discovery_reflection -> getProperty ( 'name' ) ; $ property -> setAccessible ( TRUE ) ; $ name = $ property -> getValue ( $ wrapped_discovery ) ; $ data [ 'yaml_file_suffix' ] = $ name ; }
Analyse the plugin type manager service for YAML plugins.

This adds:
- yaml_file_suffix
- yaml_properties

@param &$data
The data for a single plugin type.
@param $service
The plugin manager service.
@param $discovery
The plugin discovery object.
Analyse the plugin type manager service for YAML plugins .