You are here

public function WebformSubmission::getCurrentPageTitle in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Entity/WebformSubmission.php \Drupal\webform\Entity\WebformSubmission::getCurrentPageTitle()

Get the submission's current page title.

Return value

string The submission's current page title.

Overrides WebformSubmissionInterface::getCurrentPageTitle

File

src/Entity/WebformSubmission.php, line 390

Class

WebformSubmission
Defines the WebformSubmission entity.

Namespace

Drupal\webform\Entity

Code

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