3 namespace Drupal\drupalmoduleupgrader\Plugin\DMU\Converter;
5 use Drupal\drupalmoduleupgrader\ConverterBase;
6 use Drupal\drupalmoduleupgrader\TargetInterface;
10 * id = "hook_url_outbound_alter",
11 * description = @Translation("Converts hook_url_outbound_alter() to a service."),
12 * hook = "hook_url_outbound_alter"
15 class HookURLOutboundAlter extends ConverterBase {
20 public function convert(TargetInterface $target) {
21 $this->writeService($target, 'outbound_path_processor', [
22 'class' => 'Drupal\\' . $target->id() . '\\OutboundPathProcessor',
24 [ 'name' => 'path_processor_outbound' ],
29 '#theme' => 'dmu_outbound_path_processor',
30 '#module' => $target->id(),
32 $processor = $this->parse($render);
34 ->getIndexer('function')
35 ->get('hook_url_outbound_alter')
36 ->cloneAsMethodOf($processor)
37 ->setName('processOutbound');
38 $this->writeClass($target, $processor);