You are here

function LinkitSearchPluginEntity::createDescription in Linkit 7.3

Create a search row description.

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

Parameters

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

Return value

A string containing the row description.

See also

token_replace()

2 calls to LinkitSearchPluginEntity::createDescription()
LinkitSearchPluginEntity::fetchResults in plugins/linkit_search/entity.class.php
Implements LinkitSearchPluginInterface::fetchResults().
LinkitSearchPluginFile::createDescription in plugins/linkit_search/file.class.php
Overrides LinkitSearchPluginEntity::createDescription().
2 methods override LinkitSearchPluginEntity::createDescription()
LinkitSearchPluginFile::createDescription in plugins/linkit_search/file.class.php
Overrides LinkitSearchPluginEntity::createDescription().
LinkitSearchPluginTaxonomy_term::createDescription in plugins/linkit_search/taxonomy_term.class.php
Overrides LinkitSearchPluginEntity::createDescription().

File

plugins/linkit_search/entity.class.php, line 116
Define Linkit entity search plugin class.

Class

LinkitSearchPluginEntity
Represents a Linkit entity search plugin.

Code

function createDescription($data) {
  $description = token_replace(check_plain($this->conf['result_description']), array(
    $this->plugin['entity_type'] => $data,
  ), array(
    'clear' => TRUE,
  ));
  return $description;
}