getPluginTypes example

return $plugins;
  }

  /** * Gets all the views plugin definitions. * * @return array * An array of plugin definitions for all types. */
  public static function getPluginDefinitions() {
    $plugins = [];
    foreach (ViewExecutable::getPluginTypes() as $plugin_type) {
      $plugins[$plugin_type] = static::pluginManager($plugin_type)->getDefinitions();
    }

    return $plugins;
  }

  /** * Gets enabled display extenders. */
  public static function getEnabledDisplayExtenders() {
    $enabled = array_filter((array) \Drupal::config('views.settings')->get('display_extenders'));

    
/** * Gets all the plugins used by the display. * * @param bool $only_overrides * Whether to include only overridden plugins. * * @return \Drupal\views\Plugin\views\ViewsPluginInterface[] */
  protected function getAllPlugins($only_overrides = FALSE) {
    $plugins = [];
    // Collect all dependencies of plugins.     foreach (Views::getPluginTypes('plugin') as $plugin_type) {
      $plugin = $this->getPlugin($plugin_type);
      if (!$plugin) {
        continue;
      }
      if ($only_overrides && $this->isDefaulted($plugin_type)) {
        continue;
      }
      $plugins[] = $plugin;
    }
    return $plugins;
  }

  
'filter',
      'join',
      'pager',
      'query',
      'relationship',
      'row',
      'sort',
      'style',
      'wizard',
    ];

    $diff = array_diff($plugin_list, ViewExecutable::getPluginTypes());
    $this->assertEmpty($diff);
  }

}
public static function getHandlerTypes() {
    return Views::getHandlerTypes();
  }

  /** * Returns the valid types of plugins that can be used. * * @return array * An array of plugin type strings. */
  public static function getPluginTypes($type = NULL) {
    return Views::getPluginTypes($type);
  }

  /** * Adds an instance of a handler to the view. * * Items may be fields, filters, sort criteria, or arguments. * * @param string $display_id * The machine name of the display. * @param string $type * The type of handler being added. * @param string $table * The name of the table this handler is from. * @param string $field * The name of the field this handler is from. * @param array $options * (optional) Extra options for this instance. Defaults to an empty array. * @param string $id * (optional) A unique ID for this handler instance. Defaults to NULL, in * which case one will be generated. * * @return string * The unique ID for this handler instance. */
Home | Imprint | This part of the site doesn't use cookies.