You are here

public function PriceModifierForm::exists in Price 8

Same name and namespace in other branches
  1. 3.x src/Form/PriceModifierForm.php \Drupal\price\Form\PriceModifierForm::exists()
  2. 3.0.x src/Form/PriceModifierForm.php \Drupal\price\Form\PriceModifierForm::exists()

Check whether the entity type exists.

Parameters

$id:

Return value

bool

File

src/Form/PriceModifierForm.php, line 103

Class

PriceModifierForm

Namespace

Drupal\price\Form

Code

public function exists($id) {
  return !empty($this->entityTypeManager
    ->getStorage($this->entity
    ->getEntityType()
    ->id())
    ->load($id));
}