public function FormsStepsStepFormBase::exists in Forms Steps 8
Determines if the forms steps step already exists.
Parameters
string $step_id: The forms steps step ID.
Return value
bool TRUE if the forms steps step exists, FALSE otherwise.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
File
- src/
Form/ FormsStepsStepFormBase.php, line 568
Class
- FormsStepsStepFormBase
- Class FormsStepsStepFormBase.
Namespace
Drupal\forms_steps\FormCode
public function exists($step_id) {
/** @var \Drupal\forms_steps\FormsStepsInterface $original_forms_steps */
$original_forms_steps = $this->entityTypeManager
->getStorage('forms_steps')
->loadUnchanged($this
->getEntity()
->id());
return $original_forms_steps
->hasStep($step_id);
}