You are here

function views_object_types in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 6.3 includes/view.inc \views_object_types()
  2. 7.3 includes/view.inc \views_object_types()

Provide a list of views object types used in a view, with some information about them.

Related topics

22 calls to views_object_types()
template_preprocess_views_ui_edit_item in includes/admin.inc
Add information about a section to a display.
view::destroy in includes/view.inc
Unset references so that a $view object may be properly garbage collected.
view::init_handlers in includes/view.inc
Acquire and attach all of the handlers.
view::_pre_query in includes/view.inc
Run the pre_query() on all active handlers.
views_db_object::add_item in includes/view.inc
Add an item with a handler to the view.

... See full list

File

includes/view.inc, line 2073
view.inc Provides the view object type and associated methods.

Code

function views_object_types() {
  static $retval = NULL;

  // statically cache this so t() doesn't run a bajillion times.
  if (!isset($retval)) {
    $retval = array(
      'field' => array(
        'title' => t('Fields'),
        // title
        'ltitle' => t('fields'),
        // lowercase title for mid-sentence
        'stitle' => t('Field'),
        // singular title
        'lstitle' => t('field'),
        // singular lowercase title for mid sentence
        'plural' => 'fields',
      ),
      'argument' => array(
        'title' => t('Arguments'),
        'ltitle' => t('arguments'),
        'stitle' => t('Argument'),
        'lstitle' => t('Argument'),
        'plural' => 'arguments',
      ),
      'sort' => array(
        'title' => t('Sort criteria'),
        'ltitle' => t('sort criteria'),
        'stitle' => t('Sort criterion'),
        'lstitle' => t('sort criterion'),
        'plural' => 'sorts',
      ),
      'filter' => array(
        'title' => t('Filters'),
        'ltitle' => t('filters'),
        'stitle' => t('Filter'),
        'lstitle' => t('filter'),
        'plural' => 'filters',
        'options' => 'views_ui_config_filters_form',
      ),
      'relationship' => array(
        'title' => t('Relationships'),
        'ltitle' => t('relationships'),
        'stitle' => t('Relationship'),
        'lstitle' => t('Relationship'),
        'plural' => 'relationships',
      ),
    );
  }
  return $retval;
}