public function YamlFormSubmission::label in YAML Form 8
Gets the label of the entity.
Return value
string|null The label of the entity, or NULL if there is no label defined.
Overrides ContentEntityBase::label
File
- src/
Entity/ YamlFormSubmission.php, line 201
Class
- YamlFormSubmission
- Defines the YamlFormSubmission entity.
Namespace
Drupal\yamlform\EntityCode
public function label() {
$t_args = [
'@id' => $this
->serial(),
];
if ($source_entity = $this
->getSourceEntity()) {
$t_args['@form'] = $source_entity
->label();
}
else {
$t_args['@form'] = $this
->getYamlForm()
->label();
}
return $this
->t('@form: Submission #@id', $t_args);
}