LayoutBuilderDecorationTestHtmlEntityFormController.php

Same filename and directory in other branches
  1. 9 core/modules/layout_builder/tests/modules/layout_builder_decoration_test/src/Controller/LayoutBuilderDecorationTestHtmlEntityFormController.php
  2. 10 core/modules/layout_builder/tests/modules/layout_builder_decoration_test/src/Controller/LayoutBuilderDecorationTestHtmlEntityFormController.php

Namespace

Drupal\layout_builder_decoration_test\Controller

File

core/modules/layout_builder/tests/modules/layout_builder_decoration_test/src/Controller/LayoutBuilderDecorationTestHtmlEntityFormController.php

View source
<?php

namespace Drupal\layout_builder_decoration_test\Controller;

use Drupal\Core\Controller\FormController;
use Drupal\Core\Routing\RouteMatchInterface;
use Symfony\Component\HttpFoundation\Request;

/**
 * Overrides the entity form controller service for layout builder decoration test.
 */
class LayoutBuilderDecorationTestHtmlEntityFormController extends FormController {
    
    /**
     * The entity form controller being decorated.
     *
     * @var \Drupal\Core\Controller\FormController
     */
    protected $entityFormController;
    
    /**
     * Constructs a LayoutBuilderDecorationTestHtmlEntityFormController object.
     *
     * @param \Drupal\Core\Controller\FormController $entity_form_controller
     *   The entity form controller being decorated.
     */
    public function __construct(FormController $entity_form_controller) {
        $this->entityFormController = $entity_form_controller;
    }
    
    /**
     * {@inheritdoc}
     */
    public function getContentResult(Request $request, RouteMatchInterface $route_match) {
        return $this->entityFormController
            ->getContentResult($request, $route_match);
    }
    
    /**
     * {@inheritdoc}
     */
    protected function getFormArgument(RouteMatchInterface $route_match) {
        return $this->entityFormController
            ->getFormArgument($route_match);
    }
    
    /**
     * {@inheritdoc}
     */
    protected function getFormObject(RouteMatchInterface $route_match, $form_arg) {
        return $this->entityFormController
            ->getFormObject($route_match, $form_arg);
    }

}

Classes

Title Deprecated Summary
LayoutBuilderDecorationTestHtmlEntityFormController Overrides the entity form controller service for layout builder decoration test.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.