X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fdrupalmoduleupgrader%2Fsrc%2FPlugin%2FDMU%2FConverter%2FFunctions%2FVariableSet.php;fp=web%2Fmodules%2Fcontrib%2Fdrupalmoduleupgrader%2Fsrc%2FPlugin%2FDMU%2FConverter%2FFunctions%2FVariableSet.php;h=682e10c212032e26e92a36e9ad685ce66de9e87e;hp=0000000000000000000000000000000000000000;hb=8acec36f19c470dfcda1ae2336826a782f41874c;hpb=e0411c4e83ba0d079034db83c3f7f55be24a0e35 diff --git a/web/modules/contrib/drupalmoduleupgrader/src/Plugin/DMU/Converter/Functions/VariableSet.php b/web/modules/contrib/drupalmoduleupgrader/src/Plugin/DMU/Converter/Functions/VariableSet.php new file mode 100644 index 000000000..682e10c21 --- /dev/null +++ b/web/modules/contrib/drupalmoduleupgrader/src/Plugin/DMU/Converter/Functions/VariableSet.php @@ -0,0 +1,34 @@ +tryRewrite($call, $target)) { + $arguments = $call->getArguments(); + + return ClassMethodCallNode::create('\Drupal', 'configFactory') + ->appendMethodCall('getEditable') + ->appendArgument($target->id() . '.settings') + ->appendMethodCall('set') + ->appendArgument(clone $arguments[0]) + ->appendArgument(clone $arguments[1]) + ->appendMethodCall('save'); + } + } + +}