NodeCollectorTrait.php in Drupal 7 to 8/9 Module Upgrader 8
File
src/Plugin/DMU/Fixer/NodeCollectorTrait.php
View source
<?php
namespace Drupal\drupalmoduleupgrader\Plugin\DMU\Fixer;
trait NodeCollectorTrait {
protected function getObjects() {
$objects = $this->target
->getIndexer($this->configuration['type'])
->get($this->configuration['id']);
if (isset($this->configuration['where'])) {
$where = $this->configuration['where'];
return $where[0] == '!' ? $objects
->not(substr($where, 1)) : $objects
->filter($where);
}
else {
return $objects;
}
}
}
Traits
Name |
Description |
NodeCollectorTrait |
Trait used by fixers which loop through existing indexer objects and do
things with them. |