You are here

views_plugin_nd_node_view.inc in Node displays 6

Contains the nd view style plugin.

File

views/views_plugin_nd_node_view.inc
View source
<?php

/**
 * @file
 * Contains the nd view style plugin.
 */

/**
 * Plugin which performs a node_view on the resulting object based on our nd build modes.
 */
class views_plugin_nd_node_view extends views_plugin_row {
  function option_definition() {
    $options = parent::option_definition();
    $options['build_mode'] = array(
      'default' => 'teaser',
    );
    $options['show_links'] = array(
      'default' => FALSE,
    );
    return $options;
  }
  function options_form(&$form, &$form_state) {
    $build_mode_options = array();
    $build_modes = nd_get_build_modes();
    foreach ($build_modes as $build_mode => $value) {
      $build_mode_options[$build_mode] = $value['title'];
    }
    $form['build_mode'] = array(
      '#type' => 'radios',
      '#title' => t('Select the build mode'),
      '#default_value' => $this->options['build_mode'],
      '#options' => $build_mode_options,
    );
    $form['show_links'] = array(
      '#type' => 'checkbox',
      '#title' => t('Show links'),
      '#default_value' => $this->options['show_links'],
    );
  }

}

Classes

Namesort descending Description
views_plugin_nd_node_view Plugin which performs a node_view on the resulting object based on our nd build modes.