writeService($target, 'outbound_path_processor', [ 'class' => 'Drupal\\' . $target->id() . '\\OutboundPathProcessor', 'tags' => [ [ 'name' => 'path_processor_outbound' ], ], ]); $render = [ '#theme' => 'dmu_outbound_path_processor', '#module' => $target->id(), ]; $processor = $this->parse($render); $target ->getIndexer('function') ->get('hook_url_outbound_alter') ->cloneAsMethodOf($processor) ->setName('processOutbound'); $this->writeClass($target, $processor); } }