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
- class \Drupal\Component\Annotation\Plugin implements AnnotationInterface
- class \Drupal\drupalmoduleupgrader\Annotation\Indexer
Expanded class hierarchy of Indexer
1 string reference to 'Indexer'
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\AnnotationView source
class Indexer extends Plugin {
/**
* The plugin ID.
*
* @var string
*/
public $id;
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Indexer:: |
public | property | The plugin ID. | |
Plugin:: |
protected | property | The plugin definition read from the class annotation. | 1 |
Plugin:: |
public | function |
Gets the value of an annotation. Overrides AnnotationInterface:: |
5 |
Plugin:: |
public | function |
Gets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the unique ID for this annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
protected | function | Parses an annotation into its definition. | |
Plugin:: |
public | function |
Sets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Sets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function | Constructs a Plugin object. | 2 |