You are here

function _nodesinblock_render_options in Nodes In Block 7

Helper function to return the status.

Parameters

$type: The name of the bundle.

Return value

$render_status Colleciton of view modes.

2 calls to _nodesinblock_render_options()
nodesinblock_form_node_form_alter in ./nodesinblock.module
Implements hook_form_BASE_FORM_ID_alter().
nodesinblock_settings in ./nodesinblock.admin.inc
Menu callback to configure general settings for nodes in block.

File

./nodesinblock.module, line 323
Nodes in block makes it possible to add multiple nodes in one block.

Code

function _nodesinblock_render_options() {
  static $render_options = array();
  if (empty($render_options)) {
    $entity_info = entity_get_info();
    foreach ($entity_info['node']['view modes'] as $key => $view_mode) {
      $render_options[$key . ':' . TRUE] = $view_mode['label'] . ' ' . t('With links');
      $render_options[$key . ':' . FALSE] = $view_mode['label'] . ' ' . t('Without links');
    }
  }
  return $render_options;
}