You are here

public function Field::setDescription in Search API 8

Sets this field's description.

Parameters

string|null $description: A human-readable description for this field, or NULL if the field has no description.

Return value

$this

Overrides FieldInterface::setDescription

File

src/Item/Field.php, line 420

Class

Field
Represents a field on a search item that can be indexed.

Namespace

Drupal\search_api\Item

Code

public function setDescription($description) {

  // Set FALSE instead of NULL so caching will work properly.
  $this->description = $description ?: FALSE;
  return $this;
}