You are here

function oa_buttons_get_command_buttons_options in Open Atrium Core 7.2

Returns an option list of buttons in the node_add bundle..

1 string reference to 'oa_buttons_get_command_buttons_options'
oa_buttons_field_default_field_bases in modules/oa_buttons/oa_buttons.features.field_base.inc
Implements hook_field_default_field_bases().

File

modules/oa_buttons/oa_buttons.module, line 66

Code

function oa_buttons_get_command_buttons_options() {
  $node_type_options =& drupal_static(__FUNCTION__, array());
  if (!$node_type_options) {
    $result = db_select('command_buttons', 'b')
      ->fields('b', array(
      'name',
      'title',
    ));
    $result = $result
      ->execute();
    while ($button = $result
      ->fetchAssoc()) {
      $node_type_options[$button['name']] = $button['title'];
    }
  }
  return $node_type_options;
}