You are here

public function FieldTargetDefinition::getPropertyLabel in Feeds 8.3

Returns the label for a given property.

Parameters

string $property: The property to get a label for.

Return value

string The label for a property.

Overrides TargetDefinition::getPropertyLabel

File

src/FieldTargetDefinition.php, line 94

Class

FieldTargetDefinition
Provides a field definition wrapped over a field definition.

Namespace

Drupal\feeds

Code

public function getPropertyLabel($property) {
  if (!empty($this->properties[$property]['label'])) {
    return $this->properties[$property]['label'];
  }
  $property_definition = $this->fieldDefinition
    ->getItemDefinition()
    ->getPropertyDefinition($property);
  return $property_definition ? $property_definition
    ->getLabel() : parent::getPropertyLabel($property);
}