You are here

function LinkitPluginEntity::buildDescription in Linkit 7.2

Build the search row description.

If there is a "result_description", run it thro token_replace.

Parameters

object $data: An entity object that will be used in the token_place function.

Overrides LinkitPlugin::buildDescription

See also

token_replace()

2 calls to LinkitPluginEntity::buildDescription()
LinkitPluginEntity::autocomplete_callback in plugins/linkit_plugins/linkit-plugin-entity.class.php
The autocomplete callback function for the Linkit Entity plugin.
LinkitPluginFile::buildDescription in plugins/linkit_plugins/linkit-plugin-file.class.php
Build the search row description.
1 method overrides LinkitPluginEntity::buildDescription()
LinkitPluginFile::buildDescription in plugins/linkit_plugins/linkit-plugin-file.class.php
Build the search row description.

File

plugins/linkit_plugins/linkit-plugin-entity.class.php, line 104
Define Linkit entity plugin.

Class

LinkitPluginEntity
@file Define Linkit entity plugin.

Code

function buildDescription($data) {
  $description = token_replace(check_plain($this->conf['result_description']), array(
    $this->plugin['entity_type'] => $data,
  ), array(
    'clear' => TRUE,
  ));
  if (isset($this->conf['reverse_menu_trail']) && $this->conf['reverse_menu_trail']) {
    $description .= $this
      ->buildReverseMenuTrail($data);
  }
  return $description;
}