You are here

PluginInstanceParamConverter.php in Plugin 8.2

File

tests/modules/plugin_test_helper/src/Controller/PluginInstanceParamConverter.php
View source
<?php

namespace Drupal\plugin_test_helper\Controller;

use Drupal\plugin_test_helper\Plugin\PluginTestHelper\MockPluginInterface;
use Symfony\Component\HttpFoundation\Response;

/**
 * Handles the route to test \Drupal\plugin\ParamConverter\PluginInstanceConverter.
 */
class PluginInstanceParamConverter {

  /**
   * Executes the route.
   *
   * @param \Drupal\plugin_test_helper\Plugin\PluginTestHelper\MockPluginInterface $plugin
   *
   * @return string
   */
  public function execute(MockPluginInterface $plugin) {
    return new Response($plugin
      ->getPluginId());
  }

}