You are here

public function MappedObjectForm::validatePull in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 5.0.x modules/salesforce_mapping_ui/src/Form/MappedObjectForm.php \Drupal\salesforce_mapping_ui\Form\MappedObjectForm::validatePull()

Salesforce ID is required for a pull.

File

modules/salesforce_mapping_ui/src/Form/MappedObjectForm.php, line 165

Class

MappedObjectForm
Salesforce Mapping Form base.

Namespace

Drupal\salesforce_mapping_ui\Form

Code

public function validatePull(array &$form, FormStateInterface $form_state) {

  // Verify SFID was given - required for pull.
  $sfid = $form_state
    ->getValue([
    'salesforce_id',
    0,
    'value',
  ], FALSE);
  if (!$sfid) {
    $form_state
      ->setErrorByName('salesforce_id', $this
      ->t('Please specify a Salesforce ID to pull.'));
    return;
  }
}