TestInvalidController.php

Same filename and directory in other branches
  1. main core/modules/system/tests/modules/router_test_directory/src/Controller/TestInvalidController.php

Namespace

Drupal\router_test\Controller

File

core/modules/system/tests/modules/router_test_directory/src/Controller/TestInvalidController.php

View source
<?php

declare (strict_types=1);
namespace Drupal\router_test\Controller;


/**
 * A structurally invalid controller that cannot be autoloaded.
 */
class TestInvalidController {
  
  /**
   * An abstract method, which is not allowed on a non-abstract class.
   *
   * @return array
   *   A render array.
   */
  abstract public function build() : array;

}

Classes

Title Deprecated Summary
TestInvalidController A structurally invalid controller that cannot be autoloaded.

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