You are here

public function YamlFormSubmissionController::title in YAML Form 8

Route title callback.

Parameters

\Drupal\yamlform\YamlFormSubmissionInterface $yamlform_submission: The form submission.

Return value

array The form submission as a render array.

2 string references to 'YamlFormSubmissionController::title'
yamlform.routing.yml in ./yamlform.routing.yml
yamlform.routing.yml
yamlform_node.routing.yml in modules/yamlform_node/yamlform_node.routing.yml
modules/yamlform_node/yamlform_node.routing.yml

File

src/Controller/YamlFormSubmissionController.php, line 131

Class

YamlFormSubmissionController
Provides route responses for form submissions.

Namespace

Drupal\yamlform\Controller

Code

public function title(YamlFormSubmissionInterface $yamlform_submission) {
  $source_entity = $this->requestHandler
    ->getCurrentSourceEntity('yamlform_submission');
  $t_args = [
    '@form' => $source_entity ? $source_entity
      ->label() : $yamlform_submission
      ->getYamlForm()
      ->label(),
    '@id' => $yamlform_submission
      ->serial(),
  ];
  return $this
    ->t('@form: Submission #@id', $t_args);
}