3 namespace Drupal\drupalmoduleupgrader\Plugin\DMU\Converter\Functions;
5 use Drupal\drupalmoduleupgrader\TargetInterface;
6 use Pharborist\Functions\FunctionCallNode;
7 use Pharborist\Objects\ClassMethodCallNode;
11 * id = "ctools_object_cache_get",
12 * description = @Translation("Rewrites calls to ctools_object_cache_get().")
15 class CToolsObjectCacheGet extends FunctionCallModifier {
20 public function rewrite(FunctionCallNode $call, TargetInterface $target) {
21 return ClassMethodCallNode::create('\Drupal', 'service')
22 ->appendArgument('user.tempstore')
23 ->appendMethodCall('get')
24 ->appendArgument(clone $call->getArgumentList()->getItem(1));