You are here

function field_group_exists in Field Group 8

Same name and namespace in other branches
  1. 8.3 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.

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 732
Allows administrators to attach custom fields to fieldable types.

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);
}