public function LanguageSelectionPageController::getDestination in Language Selection Page 8.2
Get the destination.
Loop through each plugins to find it.
Parameters
string $destination: The destination.
Return value
string The destination.
1 call to LanguageSelectionPageController::getDestination()
- LanguageSelectionPageController::main in src/
Controller/ LanguageSelectionPageController.php - Page callback.
File
- src/
Controller/ LanguageSelectionPageController.php, line 55
Class
- LanguageSelectionPageController
- The LanguageSelectionPageController class.
Namespace
Drupal\language_selection_page\ControllerCode
public function getDestination($destination = NULL) {
$config = $this
->config('language_selection_page.negotiation');
foreach ($this->pluginManager
->getDefinitions() as $def) {
$destination = $this->pluginManager
->createInstance($def['id'], $config
->get())
->getDestination($destination);
}
return $destination;
}