You are here

function command_buttons_get_bundle_label in Command Buttons 7

Get the safe human readable name of an entity bundle.

3 calls to command_buttons_get_bundle_label()
command_buttons_handler_argument_bundle::summary_name in plugins/views/command_buttons_handler_argument_bundle.inc
Provides the name to use for the summary.
command_buttons_handler_argument_bundle::title in plugins/views/command_buttons_handler_argument_bundle.inc
Get the title this argument will assign the view, given the argument.
command_buttons_handler_field_bundle::render in plugins/views/command_buttons_handler_field_bundle.inc
Render the field.

File

./command_buttons.module, line 475

Code

function command_buttons_get_bundle_label($bundle) {
  $entity_info = entity_get_info('command_buttons');
  if (empty($entity_info['bundles'][$bundle]['label'])) {
    $output = t('Unknown bundle type');
  }
  return $entity_info['bundles'][$bundle]['label'];
}