class TitleCallback

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php \Drupal\Tests\Core\Controller\TitleCallback
  2. 8.9.x core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php \Drupal\Tests\Core\Controller\TitleCallback
  3. 10 core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php \Drupal\Tests\Core\Controller\TitleCallback

Provides an example title callback for the testDynamicTitle method above.

Hierarchy

Expanded class hierarchy of TitleCallback

1 string reference to 'TitleCallback'
BatchTestController::testTitleBatch in core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php
Runs a batch for testing the title shown on the progress page.

File

core/tests/Drupal/Tests/Core/Controller/TitleResolverTest.php, line 205

Namespace

Drupal\Tests\Core\Controller
View source
class TitleCallback {
  
  /**
   * Gets the example string.
   *
   * @param string $value
   *   The dynamic value.
   *
   * @return string
   *   Returns the example string.
   */
  public function example($value) {
    return 'test ' . $value;
  }

}

Members

Title Sort descending Modifiers Object type Summary
TitleCallback::example public function Gets the example string.

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