function FormWizardBase::getFormId

Same name in other branches
  1. 4.0.x src/Wizard/FormWizardBase.php \Drupal\ctools\Wizard\FormWizardBase::getFormId()

Overrides FormInterface::getFormId

File

src/Wizard/FormWizardBase.php, line 239

Class

FormWizardBase
The base class for all form wizard.

Namespace

Drupal\ctools\Wizard

Code

public function getFormId() {
    if (!$this->getMachineName() || !$this->getTempstore()
        ->get($this->getMachineName())) {
        $cached_values = $this->initValues();
    }
    else {
        $cached_values = $this->getTempstore()
            ->get($this->getMachineName());
    }
    $operation = $this->getOperation($cached_values);
    
    /** @var \Drupal\Core\Form\FormInterface $operation */
    $operation = $this->classResolver
        ->getInstanceFromDefinition($operation['form']);
    return $operation->getFormId();
}