Returns all stations by a specific station.

@param $parameterName
@param string $lang
@return mixed
423225
public function getStationsByParameter($parameterName, $lang = 'en')
    {
        $version = $this->getParameterVersion($parameterName);
        $url = 'product/output/measured-values/'.$parameterName.'/'.$version.'/'.$lang.'/overview.json';

        $stations = $this->makeRequest($url, true);

        return $stations['stations'];
    }
1327038
public function getOnlineChildrenQueryBuilder(Node $parent, $lang = null)
    {
        return $this->getChildrenQueryBuilder($parent, $lang)
            ->andWhere('nt.online = true');
    }
1008471
public function getShopHomeUrl($lang = null, $admin = null)
    {
        return Registry::getUtilsUrl()->processUrl($this->getShopUrl($lang, $admin) . 'index.php', false);
    }
46217
public function getJsLink($lang = null, $callback = false, $onLoadClass = 'onloadCallBack')
    {
        $client_api = static::CLIENT_API;
        $params = [];

        $callback ? $this->setCallBackParams($params, $onLoadClass)  : false;
        $lang ? $params['hl'] = $lang : null;

        return $client_api . '?'. http_build_query($params);
    }
50327
public function getTemperatureLast24Hours($stationId, $lang = 'en')
    {
        $parameterName = 'temperature';
        $version = $this->getParameterVersion('homepage', 'home.html');

        $stationData = $this->getStationDataWithVersion($version, 'homepage', $stationId, $lang);
        $stationMetadata = $this->getStationByParameter($parameterName, $stationId);

        $values = $stationData[0][$parameterName];
        $parameterData = $this->formatParameterValues($values, $parameterName);

        $data = $this->formatDataByParameterData($stationId, $stationMetadata, $parameterData);

        return $data;
    }
1080527
public static function get($args, $lang = null)
    {
        $lang = !is_null($lang) ? $lang : self::getLanguage();
        $args = is_array($args) ? $args : [$args, null];

        $text = $args[0];
        //unset($args[0]);

        $hash = md5($text);

        if (count(self::$translations) == 0) {
            if (file_exists(self::getFilePath())) {
                $json = file_get_contents(self::getFilePath());
                self::$translations = json_decode($json, true);
            }
        }

        if (isset(self::$translations[$hash])
            && isset(self::$translations[$hash][$lang])
        ) {
            if (!empty(self::$translations[$hash][$lang])) {
                $args[0] = self::$translations[$hash][$lang];
                return call_user_func_array('sprintf', $args);
            }
        } else {
            self::$translations[$hash]['origin'] = $text;
            foreach (self::getAvailableLanguages() as $language) {
                if (!isset(self::$translations[$hash][$language])) {
                    self::$translations[$hash][$language] = '';
                }
            }
            $json = json_encode(
                self::$translations,
                JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE
            );
            file_put_contents(self::getFilePath(), $json);
            self::$translations = json_decode($json, true);
        }

        return call_user_func_array('sprintf', $args);
    }
1230367
public function getAll($lang = "")
    {
        $classNameArr = explode("\\", get_class($this));
        $className = "App\\Models\\".str_replace("Controller", "", $classNameArr[4]);
        $rowsPerPage = $className::$rowsPerPage;
        $class = new $className();

        $obj = DB::table($class->table);
        if(isset($_GET['order']) && isset($_GET['type'])) {
            $obj = $obj->orderBy($_GET['order'], $_GET['type']);
        }
        return $obj->simplePaginate($rowsPerPage);
    }
614568
public function children($lang='',$alias=''){
		$collname=$this->collectionName;
		$bitems=$collname::GetInstance();
		$children=$bitems->itemsFilter(array('parent'=>$this->id));
		if(empty($alias)){
			return $children;
			}
		foreach($children as $ch){
			$chalias=$ch->getalias($lang);
			if($chalias==$alias){
				return $ch;
				}
			}
		return NULL;
		}
1229041
public function getMessageForAllLanguages($key, $lang = null) {
		
		if (!$this->messages) {
			$this->loadAllMessages();
		}
		
		$messageArray = array();
		foreach ($this->messages as $language=>$messageLanguage) {
			if(is_null($lang) || $lang == "")
				$messageArray[$language] = $messageLanguage->getMessage($key);
			elseif($lang == $language)
				$messageArray[$language] = $messageLanguage->getMessage($key);
		}
		return $messageArray;
	}
1021005
public static function get_string($stringid, $component = 'moodle', $lang = null, $stringparams = array()) {
        $params = self::validate_parameters(self::get_string_parameters(),
                      array('stringid'=>$stringid, 'component' => $component, 'lang' => $lang, 'stringparams' => $stringparams));

        $stringmanager = get_string_manager();
        return $stringmanager->get_string($params['stringid'], $params['component'],
            core_external::format_string_parameters($params['stringparams']), $params['lang']);
    }
1001369
public function findByName( $name, $locale = null )
    {
        return $this->getMapper()
                    ->findByName( $name, $locale ?: $this->locale );
    }
940276
public function getPagesMenu($menuName, $lang = NULL)
    {
//         $currentUser = $this->securityContext->getToken()->getUser();
//         if ($currentUser != 'anon.')
//         {
//             $roles = $currentUser->getRoles();
//         }
//         else
//         {
//             $roles = array();
//         }
        $pages = $this->doctrine->getRepository('FulgurioLightCMSBundle:PageMenu')->findPagesOfMenu($menuName, $lang);
        $availablePages = array();
        foreach ($pages as &$page)
        {
//             $pageAccesses = $page->getAccess();
//             if (empty($pageAccesses))
//             {
//                 $page->setAllowedChildren($this->doctrine->getRepository('FulgurioLightCMSBundle:Page')->getAllowedChildren($roles, $page));
                $availablePages[] = $page;
//             }
//             else if (is_object($currentUser))
//             {
//                 foreach ($pageAccesses as $pageAccess)
//                 {
//                     if ($currentUser->hasRole($pageAccess))
//                     {
//                         $page->setAllowedChildren($this->doctrine->getRepository('FulgurioLightCMSBundle:Page')->getAllowedChildren($roles, $page));
//                         $availablePages[] = $page;
//                         break;
//                     }
//                 }
//             }
        }
        return $availablePages;
    }
691236
static function getList ($lang)
    {
        global $config;
        $query = sprintf(
            file_get_contents('sql/getListPages.sql'),
            mysql_real_escape_string($lang)
        );
        $query=$config->connexionBdd->requete($query);
        $result=array();
        while ($row = mysql_fetch_assoc($query)) {
            array_push($result, $row);
        }
        return $result;
    }
1204656
public function getParameter($parameterName) {
    $parameterName = ltrim($parameterName, '$');
    $param_tags = $this->getDocBlock()->getTagsByName('param');
    /** @var \phpDocumentor\Reflection\DocBlock\Tag\ParamTag $param_tag */
    foreach ($param_tags as $param_tag) {
      if (ltrim($param_tag->getVariableName(), '$') === $parameterName) {
        return $param_tag;
      }
    }
    return NULL;
  }
1362015
public function findAllByLevelNameByLangAsTree(Lang $lang, bool $refresh = FALSE) : array
    {
        if (!$this->allPagesByLevelNameByLangAsTree || $refresh)
        {
            $pages = PageQuery::create()
                ->joinWithPageUrl()
                ->usePageUrlQuery()
                    ->filterByLang($lang)
                ->endUse()
                ->orderByTreeLeft()
                ->findTree();

            $root = $pages->getFirst();

            $tree = $this->nestedSet->getTree($pages, $root->getTreeLeft(), $root->getTreeRight());

            $this->allPagesByLevelNameByLangAsTree = [
                'item' => NULL,
                'descendants' => $tree
            ];
        }

        return $this->allPagesByLevelNameByLangAsTree;
    }
492166
public function get($string = null, $range = '') {
        if($range) {
            $lang = isset($this->range[$range]) ? $this->range[$range] : [];
        }
        else {
            $lang = $this->lang;
        }

        foreach ($lang as $lg) {
            $count = 0;
            $string = $lg->translate($string, $count);
            if (-1 != $count) {
                break;
            }
        }

        return $string;
    }
1217026
public function search($query, $lang = 'en', $limit = 10) 
    {    
        $client = new Client(); 

        $response = $client->get(self::API_ENDPOINT, [
            'query' => [
                'action' => 'wbsearchentities',
                'format' => 'json',
                'strictlanguage' => true,
                'language' => $lang,
                'uselang' => $lang,
                'search' => $query,
                'limit' => $limit,
                'props' => ''
            ]
        ]);

        $results = json_decode($response->getBody(), true);

        $data = isset($results['search']) ? $results['search'] : [];

        $collection = collect($data);

        $output = $collection->map(function($item) use ($lang) {
            return new SearchResult($item, $lang, 'api');
        });

        return $output;
    }