You are here

public function SmsGatewayForm::exists in SMS Framework 8

Callback for `id` form element in SmsGatewayForm->buildForm.

File

src/Form/SmsGatewayForm.php, line 346

Class

SmsGatewayForm
Form controller for SMS Gateways.

Namespace

Drupal\sms\Form

Code

public function exists($entity_id, array $element, FormStateInterface $form_state) {
  $query = $this->entityQueryFactory
    ->get('sms_gateway');
  return (bool) $query
    ->condition('id', $entity_id)
    ->execute();
}