3 namespace Drupal\drupalmoduleupgrader\Plugin\DMU\Converter\Functions;
5 use Drupal\drupalmoduleupgrader\TargetInterface;
6 use Pharborist\Functions\FunctionCallNode;
7 use Pharborist\Objects\ObjectMethodCallNode;
11 * id = "field_view_value",
12 * description = @Translation("Rewrites calls to field_view_value().")
15 class FieldViewValue extends FunctionCallModifier {
20 public function rewrite(FunctionCallNode $call, TargetInterface $target) {
21 $arguments = $call->getArguments();
23 $rewritten = ObjectMethodCallNode::create(clone $arguments[3], 'view');
24 if (sizeof($arguments) >= 5) {
25 $rewritten->appendArgument(clone $arguments[4]);