function ContrivedController::displayAddedNumbers

Same name and namespace in other branches
  1. 4.0.x modules/testing_example/src/Controller/ContrivedController.php \Drupal\testing_example\Controller\ContrivedController::displayAddedNumbers()

A controller method which displays a sum in terms of hands.

Parameters

int $first: A parameter to the controller path.

int $second: A parameter to the controller path.

Return value

string[] A markup array.

1 string reference to 'ContrivedController::displayAddedNumbers'
testing_example.routing.yml in modules/testing_example/testing_example.routing.yml
modules/testing_example/testing_example.routing.yml

File

modules/testing_example/src/Controller/ContrivedController.php, line 47

Class

ContrivedController
A highly-contrived controller class used to demonstrate unit testing.

Namespace

Drupal\testing_example\Controller

Code

public function displayAddedNumbers($first, $second) {
    return [
        '#markup' => '<p>' . $this->handCount($first, $second) . '</p>',
    ];
}