node_field_build_modes

Versions
7
node_field_build_modes($obj_type)

Implement hook_field_build_modes().

Code

modules/node/node.module, line 228

<?php
function node_field_build_modes($obj_type) {
  $modes = array();
  if ($obj_type == 'node') {
    $modes = array(
      'teaser' => t('Teaser'),
      'full' => t('Full node'),
      'rss' => t('RSS'),
    );
    // Search integration is provided by node.module, so search-related
    // build-modes for nodes are defined here and not in search.module.
    if (module_exists('search')) {
      $modes += array(
        'search_index' => t('Search Index'),
        'search_result' => t('Search Result'),
      );
    }
  }
  return $modes;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.