You are here

class TaxonomyDisplayAssociatedDisplayHandlerHidden in Taxonomy display 7

Add a display handler that will hide the term when viewed.

Hierarchy

Expanded class hierarchy of TaxonomyDisplayAssociatedDisplayHandlerHidden

File

handlers/associated/hidden.inc, line 6

View source
class TaxonomyDisplayAssociatedDisplayHandlerHidden extends TaxonomyDisplayAssociatedDisplayHandler {

  /**
   * Do not display anything to the user, we return an empty string.
   *
   * @see TaxonomyDisplayAssociatedDisplayHandler::displayAssociated()
   */
  public function displayAssociated($term, $options = NULL) {
    return array();
  }

  /**
   * Set a description when the user selects this option.
   *
   * @see TaxonomyDisplayHandlerForm::formFieldset()
   */
  public function formFieldset(&$form, &$values, $options = NULL) {
    $form['#description'] = t('The associated content for the term will not be displayed to the user when viewed. Leaving only the title and term display.');
  }

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

}

Members

Namesort descending Modifiers Type Description Overrides
TaxonomyDisplayAssociatedDisplayHandlerHidden::displayAssociated public function Do not display anything to the user, we return an empty string. Overrides TaxonomyDisplayAssociatedDisplayHandler::displayAssociated
TaxonomyDisplayAssociatedDisplayHandlerHidden::formFieldset public function Set a description when the user selects this option. Overrides TaxonomyDisplayHandlerForm::formFieldset
TaxonomyDisplayAssociatedDisplayHandlerHidden::formSubmit public function Do not want anything stored, return void. Overrides TaxonomyDisplayHandlerForm::formSubmit
TaxonomyDisplayHandlerForm::formValidate public function Perform validation on the custom formFieldset when the user submits. 1