You are here

protected function YamlFormResultsCustomForm::getStateKey in YAML Form 8

Get the state key for the custom data.

Return value

string The state key for the custom data.

3 calls to YamlFormResultsCustomForm::getStateKey()
YamlFormResultsCustomForm::buildForm in src/Form/YamlFormResultsCustomForm.php
Form constructor.
YamlFormResultsCustomForm::delete in src/Form/YamlFormResultsCustomForm.php
Form delete customized columns handler.
YamlFormResultsCustomForm::submitForm in src/Form/YamlFormResultsCustomForm.php
Form submission handler.

File

src/Form/YamlFormResultsCustomForm.php, line 325

Class

YamlFormResultsCustomForm
Form for form results custom(ize) form.

Namespace

Drupal\yamlform\Form

Code

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