You are here

public function MappingEditForm::getAvailableLanguages in GatherContent 8.3

Get available languages from currect row.

Parameters

array $row: Currect row from mapping.

Return value

array Array with available languages.

1 call to MappingEditForm::getAvailableLanguages()
MappingEditForm::submitForm in src/Form/MappingEditForm.php
This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state…

File

src/Form/MappingEditForm.php, line 1299

Class

MappingEditForm
Class MappingEditForm.

Namespace

Drupal\gathercontent\Form

Code

public function getAvailableLanguages(array $row) {
  $languages = array_keys($row);
  foreach ($languages as $i => $language) {
    if ($language === 'und') {
      unset($languages[$i]);
    }
    elseif ($language === 'terms') {
      unset($languages[$i]);
    }
  }
  return $languages;
}