summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_custom.inc
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2013-01-03 15:26:55 (GMT)
committerTorsten Grote <t@grobox.de>2013-01-03 15:26:55 (GMT)
commit558611be63d87a2bf9ffaaaab832ab162ff5ac00 (patch)
tree6b2c0738811d155c9f5bff346a4dc60b6a9d4e7b /kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_custom.inc
parent06f2e8dfdc6d9f7daf1a4d892299734452722d23 (diff)
downloadkolab.org-www-558611be63d87a2bf9ffaaaab832ab162ff5ac00.tar.gz
removed old drupal versions
Diffstat (limited to 'kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_custom.inc')
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_custom.inc55
1 files changed, 0 insertions, 55 deletions
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_custom.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_custom.inc
deleted file mode 100644
index 66586de..0000000
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_field_custom.inc
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-
-/**
- * @file
- * Definition of views_handler_field_custom.
- */
-
-/**
- * A handler to provide a field that is completely custom by the administrator.
- *
- * @ingroup views_field_handlers
- */
-class views_handler_field_custom extends views_handler_field {
- function query() {
- // do nothing -- to override the parent query.
- }
-
- function option_definition() {
- $options = parent::option_definition();
-
- // Override the alter text option to always alter the text.
- $options['alter']['contains']['alter_text'] = array('default' => TRUE, 'bool' => TRUE);
- $options['hide_alter_empty'] = array('default' => FALSE, 'bool' => TRUE);
- return $options;
- }
-
- function options_form(&$form, &$form_state) {
- parent::options_form($form, $form_state);
-
- // Remove the checkbox
- unset($form['alter']['alter_text']);
- unset($form['alter']['text']['#dependency']);
- unset($form['alter']['text']['#process']);
- unset($form['alter']['help']['#dependency']);
- unset($form['alter']['help']['#process']);
- $form['#pre_render'][] = 'views_handler_field_custom_pre_render_move_text';
- }
-
- function render($values) {
- // Return the text, so the code never thinks the value is empty.
- return $this->options['alter']['text'];
- }
-}
-
-/**
- * Prerender function to move the textarea to the top.
- */
-function views_handler_field_custom_pre_render_move_text($form) {
- $form['text'] = $form['alter']['text'];
- $form['help'] = $form['alter']['help'];
- unset($form['alter']['text']);
- unset($form['alter']['help']);
-
- return $form;
-}