You are here

protected function Exporter::validOptionId in GatherContent 8.5

Check if the given option ID is valid for the template.

Parameters

array $options: Options array.

string $optionId: Option ID.

Return value

bool Returns if the option ID is valid for a given template.

1 call to Exporter::validOptionId()
Exporter::processSetFields in gathercontent_upload/src/Export/Exporter.php
Set value of the field.

File

gathercontent_upload/src/Export/Exporter.php, line 730

Class

Exporter
Class for handling import/update logic from GatherContent to Drupal.

Namespace

Drupal\gathercontent_upload\Export

Code

protected function validOptionId(array $options, string $optionId) {
  foreach ($options as $option) {
    if ($option->optionId === $optionId) {
      return TRUE;
    }
  }
  return FALSE;
}