X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fdrupalmoduleupgrader%2Fsrc%2FPlugin%2FDMU%2FFixer%2FNodeCollectorTrait.php;fp=web%2Fmodules%2Fcontrib%2Fdrupalmoduleupgrader%2Fsrc%2FPlugin%2FDMU%2FFixer%2FNodeCollectorTrait.php;h=7ae15b0a9ae863c4b7877ff83617bfebd53bc050;hp=0000000000000000000000000000000000000000;hb=8acec36f19c470dfcda1ae2336826a782f41874c;hpb=e0411c4e83ba0d079034db83c3f7f55be24a0e35 diff --git a/web/modules/contrib/drupalmoduleupgrader/src/Plugin/DMU/Fixer/NodeCollectorTrait.php b/web/modules/contrib/drupalmoduleupgrader/src/Plugin/DMU/Fixer/NodeCollectorTrait.php new file mode 100644 index 000000000..7ae15b0a9 --- /dev/null +++ b/web/modules/contrib/drupalmoduleupgrader/src/Plugin/DMU/Fixer/NodeCollectorTrait.php @@ -0,0 +1,30 @@ +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; + } + } + +}