You are here

function field_group_exists in Field Group 8.3

Same name and namespace in other branches
  1. 8 field_group.module \field_group_exists()
  2. 7.2 field_group.module \field_group_exists()
  3. 7 field_group.module \field_group_exists()

Checks if a field_group exists in required context.

Parameters

string $group_name: The name of the group.

string $entity_type: The name of the entity.

string $bundle: The bundle for the entity.

$context: The context of the view mode (form or view)

string $mode: The view mode context the group will be rendered.

Return value

bool

1 call to field_group_exists()
FieldGroupAddForm::groupNameExists in src/Form/FieldGroupAddForm.php
Checks if a group machine name is taken.

File

./field_group.module, line 1030
Allows administrators to attach field groups.

Code

function field_group_exists($group_name, $entity_type, $bundle, $context, $mode) {
  return (bool) field_group_load_field_group($group_name, $entity_type, $bundle, $context, $mode);
}