You are here

function nodeviewcount_get_node_view_modes in Node view count 7

Same name and namespace in other branches
  1. 7.3 includes/pages/nodeviewcount.admin.inc \nodeviewcount_get_node_view_modes()
  2. 7.2 includes/pages/nodeviewcount.admin.inc \nodeviewcount_get_node_view_modes()

Get node view modes options.

Return value

array Associative array of node view modes.

1 call to nodeviewcount_get_node_view_modes()
nodeviewcount_admin_settings_form in includes/pages/nodeviewcount.admin.inc
Nodeviewcount admin form.

File

includes/pages/nodeviewcount.admin.inc, line 175

Code

function nodeviewcount_get_node_view_modes() {
  $options = array();
  $node_info = entity_get_info('node');
  $node_view_modes = $node_info['view modes'];
  foreach ($node_view_modes as $key => $node_view_mode) {
    $options[$key] = $node_view_mode['label'];
  }
  return $options;
}