You are here

public function MandrillActivityForm::exists in Mandrill 8

Determines if a Mandrill Activity entity exists.

Parameters

int $id: The unique ID of the Mandrill Activity entity.

Return value

bool TRUE if the entity exists.

File

modules/mandrill_activity/src/Form/MandrillActivityForm.php, line 210
Contains \Drupal\mandrill_activity\Form\MandrillActivityForm.

Class

MandrillActivityForm
Form controller for the MandrillActivity entity edit form.

Namespace

Drupal\mandrill_activity\Form

Code

public function exists($id) {
  $entity = $this->entityTypeManager
    ->getStorage('mandrill_activity')
    ->getQuery()
    ->condition('id', $id)
    ->execute();
  return (bool) $entity;
}