src/Sulu/Component/Webspace/Webspace.php
public function getLocalization($localization)
    {
        $localizations = $this->getLocalizations();
        if (!empty($localizations)) {
            foreach ($localizations as $webspaceLocalization) {
                $result = $webspaceLocalization->findLocalization($localization);

                if ($result) {
                    return $result;
                }
            }
        }

        return;
    }
public function getLocalization($localization)
    {
        $localizations = $this->getLocalizations();
        if (!empty($localizations)) {
            foreach ($localizations as $webspaceLocalization) {
                $result = $webspaceLocalization->findLocalization($localization);

                if ($result) {
                    return $result;
                }
            }
        }

        return;
    }
public function getLocalization ( $ localization ) { $ localizations = $ this -> getLocalizations ( ) ; if ( ! empty ( $ localizations ) ) { foreach ( $ localizations as $ webspaceLocalization ) { $ result = $ webspaceLocalization -> findLocalization ( $ localization ) ; if ( $ result ) { return $ result ; } } } return ; }
Returns the localization object for a given localization string.

@param string $localization

@return Localization|null
Returns the localization object for a given localization string .