You are here

public function LinkedFieldManager::getFieldDisplaySettings in Linked Field 8

Get display settings for a given field.

Parameters

\Drupal\Core\Entity\Display\EntityViewDisplayInterface $display: The entity view display.

string $field_name: The field name.

Return value

array Getting display settings.

Overrides LinkedFieldManagerInterface::getFieldDisplaySettings

File

src/LinkedFieldManager.php, line 127

Class

LinkedFieldManager
Provides helper methods for client related functionalities.

Namespace

Drupal\linked_field

Code

public function getFieldDisplaySettings(EntityViewDisplayInterface $display, $field_name) {
  $settings = [];
  $component = $display
    ->getComponent($field_name);
  if (isset($component['third_party_settings']['linked_field'])) {
    $settings = $component['third_party_settings']['linked_field'];
  }
  return $settings;
}