public function localisedField($object, $key) { $localisedKey = $key . StringUtil::startWithUpperCase($this->locale->getLang()); if (!empty($object[$localisedKey])) { return $object[$localisedKey]; } $localisedKey = $key . StringUtil::startWithUpperCase($this->locale->getDefaultLang()); return $object[$localisedKey]; }
public static function getControllerClassName($routeData) { $controllerName = StringUtil::startWithUpperCase($routeData->getControllerName()) . 'Controller'; if (RouteData::isSystemRequest($routeData)) { return "\\ph\\phAdmin\\application\\controllers\\" . $controllerName; } else { if (RouteData::isUserRequest($routeData)) { return "\\application\\controllers\\" . $controllerName; } } return null; }
public function getDefaultLangCapitalised() { return StringUtil::startWithUpperCase($this->defaultLang); }