Commit b619a2c6 authored by webchick's avatar webchick

Issue #2241827 follow-up by tim.plunkett, sun: Switch from form builder to new form validator.

parent 0828fa9e
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
namespace Drupal\rest\Plugin\views\display; namespace Drupal\rest\Plugin\views\display;
use Drupal\Core\Form\FormBuilderInterface; use Drupal\Core\Form\FormErrorInterface;
use Drupal\Core\State\StateInterface; use Drupal\Core\State\StateInterface;
use Drupal\Core\Routing\RouteProviderInterface; use Drupal\Core\Routing\RouteProviderInterface;
use Drupal\Core\ContentNegotiation; use Drupal\Core\ContentNegotiation;
...@@ -99,14 +99,14 @@ class RestExport extends PathPluginBase { ...@@ -99,14 +99,14 @@ class RestExport extends PathPluginBase {
* The route provider * The route provider
* @param \Drupal\Core\State\StateInterface $state * @param \Drupal\Core\State\StateInterface $state
* The state key value store. * The state key value store.
* @param \Drupal\Core\Form\FormBuilderInterface $form_error * @param \Drupal\Core\Form\FormErrorInterface $form_error
* The form builder. * The form error helper.
* @param \Drupal\Core\ContentNegotiation $content_negotiation * @param \Drupal\Core\ContentNegotiation $content_negotiation
* The content negotiation library. * The content negotiation library.
* @param \Symfony\Component\HttpFoundation\Request $request * @param \Symfony\Component\HttpFoundation\Request $request
* The request object. * The request object.
*/ */
public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteProviderInterface $route_provider, StateInterface $state, FormBuilderInterface $form_error, ContentNegotiation $content_negotiation, Request $request) { public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteProviderInterface $route_provider, StateInterface $state, FormErrorInterface $form_error, ContentNegotiation $content_negotiation, Request $request) {
parent::__construct($configuration, $plugin_id, $plugin_definition, $route_provider, $state, $form_error); parent::__construct($configuration, $plugin_id, $plugin_definition, $route_provider, $state, $form_error);
$this->contentNegotiation = $content_negotiation; $this->contentNegotiation = $content_negotiation;
$this->request = $request; $this->request = $request;
...@@ -122,7 +122,7 @@ public static function create(ContainerInterface $container, array $configuratio ...@@ -122,7 +122,7 @@ public static function create(ContainerInterface $container, array $configuratio
$plugin_definition, $plugin_definition,
$container->get('router.route_provider'), $container->get('router.route_provider'),
$container->get('state'), $container->get('state'),
$container->get('form_builder'), $container->get('form_validator'),
$container->get('content_negotiation'), $container->get('content_negotiation'),
$container->get('request') $container->get('request')
); );
......
...@@ -90,8 +90,8 @@ protected function setUp() { ...@@ -90,8 +90,8 @@ protected function setUp() {
->getMock(); ->getMock();
$container->set('plugin.manager.views.style', $style_manager); $container->set('plugin.manager.views.style', $style_manager);
$form_builder = $this->getMock('Drupal\Core\Form\FormBuilderInterface'); $form_error = $this->getMock('Drupal\Core\Form\FormErrorInterface');
$container->set('form_builder', $form_builder); $container->set('form_validator', $form_error);
\Drupal::setContainer($container); \Drupal::setContainer($container);
......
...@@ -81,7 +81,7 @@ public static function create(ContainerInterface $container, array $configuratio ...@@ -81,7 +81,7 @@ public static function create(ContainerInterface $container, array $configuratio
$plugin_definition, $plugin_definition,
$container->get('router.route_provider'), $container->get('router.route_provider'),
$container->get('state'), $container->get('state'),
$container->get('form_builder') $container->get('form_validator')
); );
} }
......
...@@ -79,10 +79,10 @@ public function testBuildRowEntityList() { ...@@ -79,10 +79,10 @@ public function testBuildRowEntityList() {
); );
$route_provider = $this->getMock('Drupal\Core\Routing\RouteProviderInterface'); $route_provider = $this->getMock('Drupal\Core\Routing\RouteProviderInterface');
$state = $this->getMock('\Drupal\Core\State\StateInterface'); $state = $this->getMock('\Drupal\Core\State\StateInterface');
$form_builder = $this->getMock('Drupal\Core\Form\FormBuilderInterface'); $form_error = $this->getMock('Drupal\Core\Form\FormErrorInterface');
$page_display = $this->getMock('Drupal\views\Plugin\views\display\Page', $page_display = $this->getMock('Drupal\views\Plugin\views\display\Page',
array('initDisplay', 'getPath'), array('initDisplay', 'getPath'),
array(array(), 'default', $display_manager->getDefinition('page'), $route_provider, $state, $form_builder) array(array(), 'default', $display_manager->getDefinition('page'), $route_provider, $state, $form_error)
); );
$page_display->expects($this->any()) $page_display->expects($this->any())
->method('getPath') ->method('getPath')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment