You are here

public function EntityEditFormBlock::blockSubmit in Entityform block 8

Overrides BlockPluginTrait::blockSubmit

File

src/Plugin/Block/EntityEditFormBlock.php, line 137

Class

EntityEditFormBlock
Provides a block for creating a new content entity.

Namespace

Drupal\entityform_block\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
  $selected_entity_type_bundle = $form_state
    ->getValue('entity_type_bundle');
  $values = explode('.', $selected_entity_type_bundle);
  $this->configuration['entity_type'] = $values[0];
  $this->configuration['bundle'] = $values[1];
}