You are here

public function YamlFormSubmission::getCurrentPageTitle in YAML Form 8

Get the submission's current page title.

Return value

string The submission's current page title.

Overrides YamlFormSubmissionInterface::getCurrentPageTitle

File

src/Entity/YamlFormSubmission.php, line 323

Class

YamlFormSubmission
Defines the YamlFormSubmission entity.

Namespace

Drupal\yamlform\Entity

Code

public function getCurrentPageTitle() {
  $current_page = $this
    ->getCurrentPage();
  $page = $this
    ->getYamlForm()
    ->getPage($current_page);
  return $page && isset($page['#title']) ? $page['#title'] : $current_page;
}