Version 1
[yaffs-website] / web / core / modules / node / src / Plugin / migrate / process / d6 / NodeUpdate7008.php
diff --git a/web/core/modules/node/src/Plugin/migrate/process/d6/NodeUpdate7008.php b/web/core/modules/node/src/Plugin/migrate/process/d6/NodeUpdate7008.php
new file mode 100644 (file)
index 0000000..f6da2eb
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+
+namespace Drupal\node\Plugin\migrate\process\d6;
+
+use Drupal\migrate\MigrateExecutableInterface;
+use Drupal\migrate\ProcessPluginBase;
+use Drupal\migrate\Row;
+
+/**
+ * Split the 'administer nodes' permission from 'access content overview'.
+ *
+ * @MigrateProcessPlugin(
+ *   id = "node_update_7008"
+ * )
+ */
+class NodeUpdate7008 extends ProcessPluginBase {
+
+  /**
+   * {@inheritdoc}
+   *
+   * Split the 'administer nodes' permission from 'access content overview'.
+   */
+  public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
+    if ($value === 'administer nodes') {
+      return [$value, 'access content overview'];
+    }
+    return $value;
+  }
+
+}