You are here

public function WebformSubmissionsDeleteFormBase::getLabel in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Form/WebformSubmissionsDeleteFormBase.php \Drupal\webform\Form\WebformSubmissionsDeleteFormBase::getLabel()

Get webform or source entity label.

Return value

null|string Webform or source entity label.

6 calls to WebformSubmissionsDeleteFormBase::getLabel()
WebformResultsClearForm::buildForm in src/Form/WebformResultsClearForm.php
Form constructor.
WebformResultsClearForm::getConfirmInput in src/Form/WebformResultsClearForm.php
Returns confirm input to display.
WebformResultsClearForm::getDescription in src/Form/WebformResultsClearForm.php
Returns additional text to display as a description.
WebformResultsClearForm::getMessage in src/Form/WebformResultsClearForm.php
WebformResultsClearForm::getQuestion in src/Form/WebformResultsClearForm.php
Returns the question to ask the user.

... See full list

File

src/Form/WebformSubmissionsDeleteFormBase.php, line 99

Class

WebformSubmissionsDeleteFormBase
Base webform for deleting webform submission.

Namespace

Drupal\webform\Form

Code

public function getLabel() {
  if ($this->sourceEntity) {
    return $this->sourceEntity
      ->label();
  }
  elseif ($this->webform
    ->label()) {
    return $this->webform
      ->label();
  }
  else {
    return '';
  }
}