You are here

function LinkitPluginTaxonomy_Term::buildSettingsForm in Linkit 7.2

Settings for the term plugin.

Overrides LinkitPluginEntity::buildSettingsForm

File

plugins/linkit_plugins/linkit-plugin-taxonomy_term.class.php, line 38
Define Linkit term plugin class.

Class

LinkitPluginTaxonomy_Term
@file Define Linkit term plugin class.

Code

function buildSettingsForm() {
  $form = parent::buildSettingsForm();

  // The entity plugin uses the entity name for the #token_types, but terms
  // is a special case, its name is "Taxonomy_term" and the tokens are defined
  // (in the taxonomy module) with just "term".
  if (isset($form[$this->plugin['name']]['token_help']['help']['#token_types'])) {
    $form[$this->plugin['name']]['token_help']['help']['#token_types'] = array(
      'term',
    );
  }
  return $form;
}