#633482 by dagmar: pre_execute() method needs to be called on exposed forms.
[project/views.git] / handlers / views_handler_field_custom.inc
CommitLineData
d8c64e8b
EM
1<?php
2// $Id$
3
4/**
5 * A handler to provide a field that is completely custom by the administrator.
6 *
7 * @ingroup views_field_handlers
8 */
9class views_handler_field_custom extends views_handler_field {
10 function query() {
11 // do nothing -- to override the parent query.
12 }
13
14 function option_definition() {
15 $options = parent::option_definition();
16
17 // Override the alter text option to always alter the text.
18 $options['alter']['contains']['alter_text'] = array('default' => TRUE);
19 return $options;
20 }
21
22 function options_form(&$form, &$form_state) {
23 parent::options_form($form, $form_state);
24
25 // Remove the checkbox
26 unset($form['alter']['alter_text']);
27 unset($form['alter']['text']['#dependency']);
28 unset($form['alter']['text']['#process']);
29 }
30
31 function render($values) {
32 // Nothing to render.
33 return '';
34 }
35}