hidden.inc 904 Bytes
Newer Older
Cody Craven's avatar
Cody Craven committed
1
2
3
4
5
6
7
8
<?php
// $Id$

/**
 * Add a display handler that will hide the term when viewed.
 */
class TaxonomyDisplayTermDisplayHandlerHidden extends TaxonomyDisplayTermDisplayHandler {
  /**
9
   * Do not display anything to the user, we return an empty array.
Cody Craven's avatar
Cody Craven committed
10
11
12
   *
   * @see TaxonomyDisplayTermDisplayHandler::displayTerm()
   */
13
  public function displayTerm($term, $options = NULL) {
14
    return array();
Cody Craven's avatar
Cody Craven committed
15
16
17
18
19
20
21
  }

  /**
   * Set a description when the user selects this option.
   *
   * @see TaxonomyDisplayHandlerForm::formFieldset()
   */
22
23
  public function formFieldset(&$form, &$values, $options = NULL) {
    $form['#description'] = t('The term will not be displayed to the user when viewed. Leaving only the title and associated content.');
Cody Craven's avatar
Cody Craven committed
24
25
26
27
28
29
30
  }

  /**
   * Do not want anything stored, return void.
   *
   * @see TaxonomyDisplayHandlerForm::formSubmit()
   */
31
  public function formSubmit($form, &$values) {}
32
}