You are here

public function CurrentSearchItem::getTokenTree in Facet API 6.3

Same name and namespace in other branches
  1. 7.2 contrib/current_search/plugins/current_search/item.inc \CurrentSearchItem::getTokenTree()
  2. 7 contrib/current_search/plugins/current_search/item.inc \CurrentSearchItem::getTokenTree()

Returns the token tree element.

Return value

array The token FAPI element.

3 calls to CurrentSearchItem::getTokenTree()
CurrentSearchGroup::settingsForm in contrib/current_search/plugins/current_search/item_group.inc
Implements CurrentSearchItem::settingsForm().
CurrentSearchItemActive::settingsForm in contrib/current_search/plugins/current_search/item_active.inc
Implements CurrentSearchItem::settingsForm().
CurrentSearchItemText::settingsForm in contrib/current_search/plugins/current_search/item_text.inc
Implements CurrentSearchItem::settingsForm().

File

contrib/current_search/plugins/current_search/item.inc, line 187
Current search plugin base class.

Class

CurrentSearchItem
Base class for current search item plugins.

Code

public function getTokenTree(array $types = array()) {
  if (module_exists('token')) {
    return array(
      '#theme' => 'token_tree',
      '#token_types' => $types,
    );
  }
  else {
    return array(
      '#value' => '<p>' . t('Install the <a href="http://drupal.org/project/token" target="_blank" title="Token module project page">Token</a> module to view available replacement patterns.') . '</p>',
    );
  }
}