You are here

function _auto_entitylabel_options in Automatic Entity Label 7

Constructs the list of options for the given bundle.

1 call to _auto_entitylabel_options()
auto_entitylabel_settings_form in ./auto_entitylabel.admin.inc
Administration form for each bundle.

File

./auto_entitylabel.admin.inc, line 141
Contains administration forms.

Code

function _auto_entitylabel_options($entity_type, $bundle_name) {
  $options = array(
    AUTO_ENTITYLABEL_DISABLED => t('Disabled'),
  );
  if (auto_entitylabel_entity_label_visible($entity_type, $bundle_name)) {
    $options += array(
      AUTO_ENTITYLABEL_ENABLED => t('Automatically generate the label and hide the label field'),
      AUTO_ENTITYLABEL_OPTIONAL => t('Automatically generate the label if the label field is left empty'),
    );
  }
  else {
    $options += array(
      AUTO_ENTITYLABEL_ENABLED => t('Automatically generate the label'),
    );
  }
  return $options;
}