You are here

protected function PoolForm::getCurrentFormStep in CMS Content Sync 2.1.x

Same name and namespace in other branches
  1. 8 src/Form/PoolForm.php \Drupal\cms_content_sync\Form\PoolForm::getCurrentFormStep()
  2. 2.0.x src/Form/PoolForm.php \Drupal\cms_content_sync\Form\PoolForm::getCurrentFormStep()

Return the current step of our multi-step form.

Return value

string

2 calls to PoolForm::getCurrentFormStep()
PoolForm::actions in src/Form/PoolForm.php
Returns an array of supported actions for the current entity form.
PoolForm::form in src/Form/PoolForm.php
Gets the actual form array to be built.

File

src/Form/PoolForm.php, line 349

Class

PoolForm
Form handler for the Pool add and edit forms.

Namespace

Drupal\cms_content_sync\Form

Code

protected function getCurrentFormStep(FormStateInterface $form_state) {

  /**
   * @var \Drupal\cms_content_sync\Entity\Pool $pool
   */
  $pool = $this->entity;
  if (!$pool
    ->getSyncCoreUrl() && !$form_state
    ->getValue('backend_url')) {
    return self::STEP_SYNC_CORE;
  }
  return self::STEP_POOL;
}