You are here

public function FieldsPluginOptions::getAssignedRegion in Layout Plugin Views 8

Same name and namespace in other branches
  1. 8.2 src/FieldsPluginOptions.php \Drupal\layout_plugin_views\FieldsPluginOptions::getAssignedRegion()

Retrieves the region machine name that was assigned to the given field.

Parameters

string $field_machine_name:

Return value

string The machine name of the region that the given field is assigned to or an empty string if the field is not assigned to a region.

File

src/FieldsPluginOptions.php, line 57

Class

FieldsPluginOptions

Namespace

Drupal\layout_plugin_views

Code

public function getAssignedRegion($field_machine_name) {
  if (isset($this->plugin->options['assigned_regions'][$field_machine_name])) {
    return $this->plugin->options['assigned_regions'][$field_machine_name];
  }
  else {
    return '';
  }
}