You are here

function _multifield_warn_no_subfields in Multifield 7.2

Same name and namespace in other branches
  1. 7 multifield.module \_multifield_warn_no_subfields()
2 calls to _multifield_warn_no_subfields()
multifield_form_field_ui_field_edit_form_alter in ./multifield.module
Implements hook_form_FORM_ID_alter() for field_ui_field_edit_form().
multifield_form_field_ui_field_settings_form_alter in ./multifield.module

File

./multifield.module, line 649

Code

function _multifield_warn_no_subfields($field) {
  if ($machine_name = multifield_extract_multifield_machine_name($field)) {
    if (!multifield_type_has_subfields($machine_name) && module_exists('field_ui') && user_access('administer multifield')) {
      drupal_set_message(t('This multifield does not have any subfields yet. Go to the <a href="@subfields">manage subfields page</a> to add some.', array(
        '@subfields' => url('admin/structure/multifield/manage/' . $machine_name . '/fields'),
      )), 'error', FALSE);
    }
  }
}