You are here

function sharemessage_check_machine_name_if_exist in Share Message 8

Same name and namespace in other branches
  1. 7 sharemessage.module \sharemessage_check_machine_name_if_exist()

Checks whether a machine name already exists.

Parameters

mixed $value: The ID of the entity to load.

Return value

bool TRUE if Share Message with given name exists, FALSE otherwise.

1 string reference to 'sharemessage_check_machine_name_if_exist'
ShareMessageForm::form in src/Form/ShareMessageForm.php
Overrides Drupal\Core\Entity\EntityFormController::form().

File

./sharemessage.module, line 20
New Sharing Module.

Code

function sharemessage_check_machine_name_if_exist($value) {
  return \Drupal::entityTypeManager()
    ->getStorage('sharemessage')
    ->load($value);
}