public function SmartDateFormatForm::exists in Smart Date 8
Same name and namespace in other branches
- 8.2 src/Form/SmartDateFormatForm.php \Drupal\smart_date\Form\SmartDateFormatForm::exists()
- 3.x src/Form/SmartDateFormatForm.php \Drupal\smart_date\Form\SmartDateFormatForm::exists()
- 3.0.x src/Form/SmartDateFormatForm.php \Drupal\smart_date\Form\SmartDateFormatForm::exists()
- 3.1.x src/Form/SmartDateFormatForm.php \Drupal\smart_date\Form\SmartDateFormatForm::exists()
- 3.2.x src/Form/SmartDateFormatForm.php \Drupal\smart_date\Form\SmartDateFormatForm::exists()
- 3.3.x src/Form/SmartDateFormatForm.php \Drupal\smart_date\Form\SmartDateFormatForm::exists()
- 3.4.x src/Form/SmartDateFormatForm.php \Drupal\smart_date\Form\SmartDateFormatForm::exists()
Checks for an existing date format.
Parameters
string|int $entity_id: The entity ID.
array $element: The form element.
Return value
bool TRUE if this format already exists, FALSE otherwise.
File
- src/
Form/ SmartDateFormatForm.php, line 67
Class
- SmartDateFormatForm
- Form controller for smart date format edit forms.
Namespace
Drupal\smart_date\FormCode
public function exists($entity_id, array $element) {
return (bool) $this->smartDateFormatStorage
->load($entity_id);
}