public function getPluginForConfigType($config_type) {
    $plugins = [];

    foreach ($this->getDefinitions() as $plugin_id => $plugin) {
      try {
        $instance = $this->createInstance($plugin_id);
      }
      catch (PluginException $exception) {
        continue;
      }

      if ($instance->getConfigType() !== $config_type) {
        continue;
      }
      $plugins[] = [
        'plugin' => $instance,
        'weight' => $instance->weight(),
      ];
    }

    if (empty($plugins)) {
      return NULL;
    }
    usort($plugins, ['\Drupal\Component\Utility\SortArray', 'sortByWeightElement']);
    $data = reset($plugins);

    return $data['plugin'];
  }
public function getPluginForConfigType($config_type) {
    $plugins = [];

    foreach ($this->getDefinitions() as $plugin_id => $plugin) {
      try {
        $instance = $this->createInstance($plugin_id);
      }
      catch (PluginException $exception) {
        continue;
      }

      if ($instance->getConfigType() !== $config_type) {
        continue;
      }
      $plugins[] = [
        'plugin' => $instance,
        'weight' => $instance->weight(),
      ];
    }

    if (empty($plugins)) {
      return NULL;
    }
    usort($plugins, ['\Drupal\Component\Utility\SortArray', 'sortByWeightElement']);
    $data = reset($plugins);

    return $data['plugin'];
  }
public function getPluginForConfigType ( $ config_type ) { $ plugins = [ ] ; foreach ( $ this -> getDefinitions ( ) as $ plugin_id => $ plugin ) { try { $ instance = $ this -> createInstance ( $ plugin_id ) ; } catch ( PluginException $ exception ) { continue ; } if ( $ instance -> getConfigType ( ) !== $ config_type ) { continue ; } $ plugins [ ] = [ 'plugin' => $ instance , 'weight' => $ instance -> weight ( ) , ] ; } if ( empty ( $ plugins ) ) { return NULL ; } usort ( $ plugins , [ '\Drupal\Component\Utility\SortArray' , 'sortByWeightElement' ] ) ; $ data = reset ( $ plugins ) ; return $ data [ 'plugin' ] ; }
Get ignore rules for specified config type.

@param string $config_type
Config type (entity_form_display, field_config, view, etc).

@return array
Config ignore rules.
Get ignore rules for specified config type .