protected function NodeCollectorTrait::getObjects in Drupal 7 to 8/9 Module Upgrader 8
3 calls to NodeCollectorTrait::getObjects()
- Delete::execute in src/
Plugin/ DMU/ Fixer/ Delete.php - Executes the plugin.
- Disable::execute in src/
Plugin/ DMU/ Fixer/ Disable.php - Executes the plugin.
- Notify::execute in src/
Plugin/ DMU/ Fixer/ Notify.php - Executes the plugin.
File
- src/
Plugin/ DMU/ Fixer/ NodeCollectorTrait.php, line 11
Class
- NodeCollectorTrait
- Trait used by fixers which loop through existing indexer objects and do things with them.
Namespace
Drupal\drupalmoduleupgrader\Plugin\DMU\FixerCode
protected function getObjects() {
/** @var \Pharborist\NodeCollection $objects */
$objects = $this->target
->getIndexer($this->configuration['type'])
->get($this->configuration['id']);
if (isset($this->configuration['where'])) {
$where = $this->configuration['where'];
// If the first character of the filter is an exclamation point, negate it.
return $where[0] == '!' ? $objects
->not(substr($where, 1)) : $objects
->filter($where);
}
else {
return $objects;
}
}