You are here

function views_content_cache_key_og::options_form in Views content cache 6.2

Same name and namespace in other branches
  1. 7.3 plugins/views_content_cache/og.inc \views_content_cache_key_og::options_form()

Optionally provides a option form for the user to use this segment.

Typical uses of this will include returning a checkboxes FormAPI element that will allow the user to indicate which keys in the cache segement they are interested in for the view that they are building. Eg. Checkboxes for each node type or each organic group.

Parameters

$value: The default value that has been previously set.

$handler: The handler that this options for is for.

Return value

A FormAPI element that will appear as part of the views content cache options form when building a view.

Overrides views_content_cache_key::options_form

File

plugins/og.inc, line 11

Class

views_content_cache_key_og
Views content cache plugin for Organic Groups.

Code

function options_form($value, &$handler) {
  return array(
    '#title' => t('Organic Groups'),
    '#description' => t('Checks for updates related to Organic Groups'),
    '#type' => 'checkboxes',
    '#options' => array_merge(array(
      'current' => t('Current group'),
      'user' => t("Member's groups"),
    ), $this
      ->additional_options_for_arguments($handler->view)),
    '#default_value' => $value,
  );
}