You are here

protected function WebformResultsCustomForm::getDataKey in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Form/WebformResultsCustomForm.php \Drupal\webform\Form\WebformResultsCustomForm::getDataKey()

Get the full key for the custom data.

Parameters

string $name: The name for the custom data.

Return value

string The full key for the custom data.

4 calls to WebformResultsCustomForm::getDataKey()
WebformResultsCustomForm::deleteData in src/Form/WebformResultsCustomForm.php
Delete custom data.
WebformResultsCustomForm::getData in src/Form/WebformResultsCustomForm.php
Get custom data.
WebformResultsCustomForm::hasData in src/Form/WebformResultsCustomForm.php
Determine if there is custom data for given name.
WebformResultsCustomForm::setData in src/Form/WebformResultsCustomForm.php
Set custom data.

File

src/Form/WebformResultsCustomForm.php, line 520

Class

WebformResultsCustomForm
Webform for webform results custom(ize) webform.

Namespace

Drupal\webform\Form

Code

protected function getDataKey($name) {
  if ($source_entity = $this->sourceEntity) {
    return "results.custom.{$name}." . $source_entity
      ->getEntityTypeId() . '.' . $source_entity
      ->id();
  }
  else {
    return "results.custom.{$name}";
  }
}