Version 1
[yaffs-website] / web / core / modules / node / src / Plugin / migrate / process / d6 / NodeUpdate7008.php
1 <?php
2
3 namespace Drupal\node\Plugin\migrate\process\d6;
4
5 use Drupal\migrate\MigrateExecutableInterface;
6 use Drupal\migrate\ProcessPluginBase;
7 use Drupal\migrate\Row;
8
9 /**
10  * Split the 'administer nodes' permission from 'access content overview'.
11  *
12  * @MigrateProcessPlugin(
13  *   id = "node_update_7008"
14  * )
15  */
16 class NodeUpdate7008 extends ProcessPluginBase {
17
18   /**
19    * {@inheritdoc}
20    *
21    * Split the 'administer nodes' permission from 'access content overview'.
22    */
23   public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
24     if ($value === 'administer nodes') {
25       return [$value, 'access content overview'];
26     }
27     return $value;
28   }
29
30 }