public function FieldGroupAddForm::groupNameExists in Field Group 8.3
Same name and namespace in other branches
- 8 src/Form/FieldGroupAddForm.php \Drupal\field_group\Form\FieldGroupAddForm::groupNameExists()
Checks if a group machine name is taken.
Parameters
string $value: The machine name, not prefixed.
array $element: An array containing the structure of the 'group_name' element.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
bool Whether or not the group machine name is taken.
File
- src/
Form/ FieldGroupAddForm.php, line 310
Class
- FieldGroupAddForm
- Provides a form for adding a fieldgroup to a bundle.
Namespace
Drupal\field_group\FormCode
public function groupNameExists($value, array $element, FormStateInterface $form_state) {
// Add the prefix.
$group_name = self::GROUP_PREFIX . $value;
return field_group_exists($group_name, $this->entityTypeId, $this->bundle, $this->context, $this->mode);
}