public function MappingEditFormBase::getAvailableLanguages in GatherContent 8.4
Same name and namespace in other branches
- 8.5 gathercontent_ui/src/Form/MappingEditFormBase.php \Drupal\gathercontent_ui\Form\MappingEditFormBase::getAvailableLanguages()
Get available languages from currect row.
Parameters
array $row: Currect row from mapping.
Return value
array Array with available languages.
1 call to MappingEditFormBase::getAvailableLanguages()
- MappingEditForm::submitForm in gathercontent_ui/
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
- gathercontent_ui/
src/ Form/ MappingEditFormBase.php, line 451
Class
- MappingEditFormBase
- Class MappingEditFormBase.
Namespace
Drupal\gathercontent_ui\FormCode
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;
}