You are here

protected function ScheduledUpdateTypeBaseForm::getCurrentEntityType in Scheduled Updates 8

Get the current entity type to be updated for update type.

Parameters

\Drupal\Core\Form\FormStateInterface $form_state:

Return value

mixed

6 calls to ScheduledUpdateTypeBaseForm::getCurrentEntityType()
ScheduledUpdateTypeAddAsFieldForm::form in src/Form/ScheduledUpdateTypeAddAsFieldForm.php
Gets the actual form array to be built.
ScheduledUpdateTypeAddAsFieldForm::save in src/Form/ScheduledUpdateTypeAddAsFieldForm.php
Form submission handler for the 'save' action.
ScheduledUpdateTypeBaseForm::createCloneFieldSelect in src/Form/ScheduledUpdateTypeBaseForm.php
Create an option to select one field to clone on type add form.
ScheduledUpdateTypeBaseForm::createDefaultValueElements in src/Form/ScheduledUpdateTypeBaseForm.php
Create the default value elements for a field.
ScheduledUpdateTypeBaseForm::createNewFieldsElements in src/Form/ScheduledUpdateTypeBaseForm.php
Create options for create a new entity reference field.

... See full list

File

src/Form/ScheduledUpdateTypeBaseForm.php, line 570
Contains \Drupal\scheduled_updates\Form\ScheduledUpdateTypeBaseForm.

Class

ScheduledUpdateTypeBaseForm

Namespace

Drupal\scheduled_updates\Form

Code

protected function getCurrentEntityType(FormStateInterface $form_state) {
  $entity_type = $this->entity
    ->getUpdateEntityType();
  if (!$entity_type) {
    $entity_type = $form_state
      ->get('target_entity_type_id');
  }
  return $entity_type;
}