class TourTestController

Controller routines for tour_test routes.

Hierarchy

Expanded class hierarchy of TourTestController

File

drupal/core/modules/tour/tests/tour_test/lib/Drupal/tour_test/Controller/TourTestController.php, line 15
Contains \Drupal\tour_test\Controller\TourTestController.

Namespace

Drupal\tour_test\Controller
View source
class TourTestController implements ControllerInterface {

  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container) {
    return new static();
  }

  /**
   * Outputs some content for testing tours.
   */
  public function tourTest1() {
    return array(
      'tip-1' => array(
        '#type' => 'container',
        '#attributes' => array(
          'id' => 'tour-test-1',
        ),
        '#children' => t('Where does the rain in Spain fail?'),
      ),
      'tip-4' => array(
        '#type' => 'container',
        '#attributes' => array(
          'id' => 'tour-test-4',
        ),
        '#children' => t('Tip created later?'),
      ),
    );
  }

  /**
   * Outputs some content for testing tours.
   */
  public function tourTest2() {
    return array(
      '#type' => 'container',
      '#attributes' => array(
        'id' => 'tour-test-2',
      ),
      '#children' => t('Pangram example'),
    );
  }

}

Members

Namesort descending Modifiers Type Description Overrides
TourTestController::create public static function Instantiates a new instance of this controller. Overrides ControllerInterface::create
TourTestController::tourTest1 public function Outputs some content for testing tours.
TourTestController::tourTest2 public function Outputs some content for testing tours.