You are here

public function Field::getLabel in Search API 8

Retrieves this field's label.

The field's label, contrary to the label returned by the field's data definition, contains a human-readable representation of the full property path. The datasource label is not included, though – use getPrefixedLabel() for that.

Return value

string A human-readable label representing this field's property path.

Overrides FieldInterface::getLabel

5 calls to Field::getLabel()
Field::getDataDefinition in src/Item/Field.php
Retrieves this field's data definition.
Field::getPrefixedLabel in src/Item/Field.php
Retrieves this field's label along with datasource prefix.
Field::getSettings in src/Item/Field.php
Retrieves all settings encapsulated in this field as an array.
Field::setType in src/Item/Field.php
Sets the Search API data type of this field.
Field::__toString in src/Item/Field.php
Implements the magic __toString() method to simplify debugging.

File

src/Item/Field.php, line 383

Class

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

Namespace

Drupal\search_api\Item

Code

public function getLabel() {
  return $this->label;
}