You are here

class Indexer in Drupal 7 to 8/9 Module Upgrader 8

Defines a Plugin annotation object for DMU indexer plugins.

Indexers scan a target module to determine what's in it so that other plugins can use that information. All available indexers are always run before any other plugin type. Indexers are responsible for cataloguing things like:

  • What hooks a module implements, and where those implementations reside (i.e., which files)
  • Classes defined by a module
  • Functions defined by a module
  • Tests defined by a module, and what kind of tests they are
  • Which functions are called by the module, and when

Any information gathered by an indexer is available to other plugin types. Essentially, indexers build a "map" of a target module, which is stored in an index backend (by default, an SQLite database that lives only in memory).

Plugin Namespace: Plugin\DMU\Indexer

Hierarchy

Expanded class hierarchy of Indexer

1 string reference to 'Indexer'
drupalmoduleupgrader.services.yml in ./drupalmoduleupgrader.services.yml
drupalmoduleupgrader.services.yml
4 classes are annotated with Indexer
Classes in src/Plugin/DMU/Indexer/Classes.php
Plugin annotation @Indexer( id = "class" )
Constants in src/Plugin/DMU/Indexer/Constants.php
Plugin annotation @Indexer( id = "constant" )
FunctionCalls in src/Plugin/DMU/Indexer/FunctionCalls.php
Plugin annotation @Indexer( id = "function_call", description = @Translation("Indexes all function calls in a target module."), exclude = { "t" } )
Functions in src/Plugin/DMU/Indexer/Functions.php
Plugin annotation @Indexer( id = "function" )

File

src/Annotation/Indexer.php, line 29

Namespace

Drupal\drupalmoduleupgrader\Annotation
View source
class Indexer extends Plugin {

  /**
   * The plugin ID.
   *
   * @var string
   */
  public $id;

}

Members

Namesort descending Modifiers Type Description Overrides
Indexer::$id public property The plugin ID.
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 2