/IEconDOTA2_205790/GetHeroes/v1/

@param string $language The language to provide hero names in.
@param bool $itemizedonly Return a list of itemized heroes only.
181526
public function GetHeroesV1($language = null, $itemizedonly = null)
    {
        return $this->_call(__METHOD__, 'GET', array('language' => $language, 'itemizedonly' => $itemizedonly));
    }
756725
protected function createData(DocumentInterface $document, bool $identifiersOnly): array
    {
        if ($document->shouldBeHandledAsCollection()) {
            return $this->createCollectionData($document->data(), $identifiersOnly);
        }

        return $this->serializeResource($document->data()->first(), $identifiersOnly);
    }
681395
public function get_readers($nameonly = false) {
        if (!isset($this->logmanager)) {
            $this->logmanager = get_log_manager();
        }

        $readers = $this->logmanager->get_readers('core\log\sql_reader');
        if ($nameonly) {
            foreach ($readers as $pluginname => $reader) {
                $readers[$pluginname] = $reader->get_name();
            }
        }
        return $readers;
    }
1178223
public static function translateList($items, $languageSlug = '')
    {
        if($items) {
            if(is_a($items, 'Illuminate\Database\Eloquent\Collection')) {
                $translatedItems = $items->map(
                    function ($post) use ($languageSlug) {
                        foreach ($post->getAttributes() as $key => $value) {
                            $post->$key = self::translate($value, $languageSlug);
                        }
                        return $post;
                    }
                );
            } else {
                $translatedItems = $items;
                foreach($items as $key=>$value){
                    $translatedItems->$key = self::translate($value, $languageSlug);
                }
            }

            //if pagination
            if(method_exists($items, "setCollection")) {
                $collection = new Collection($translatedItems);
                return $items->setCollection($collection);
            }

            return $translatedItems;
        }
    }
1203350
public void addLanguage(Language language) {
        languages.add(language);

        if (dropdown.isAttached()) {
            addLanguageItem(language);
        } else {
            lazyLoaded = true;
        }
    }
330748
public function loggerOnly($loggerOnly = null)
    {
        if (func_num_args() == 0) {
            return $this->loggerOnly;
        }

        $this->loggerOnly = (bool) $loggerOnly;
    }
60536
public function getAvailableLanguagesNames($lang = null)
    {
        if (!is_null($lang)) {
            $original_lang = $this->getLanguage();
            $this->setLanguage($lang);
        }
        $db = $this->getLoader()->getOption('available_languages');
        $full_locales = array();
        if (!empty($db)) {
            foreach ($db as $ln=>$locale) {
                $full_locales[$ln] = Locale::getDisplayName($locale);
            }
        }
        if (!empty($original_lang)) {
            $this->setLanguage($original_lang);
        }
        return $full_locales;
    }
1159819
public function languageLinks($linkClass = 'nav-link', $itemClass = 'nav-item')
    {
        if (count(config('cms.languages')) > 1) {
            $languageLinks = [];
            foreach (config('cms.languages') as $key => $value) {
                $url = url(config('cms.backend-route-prefix', 'cms').'/language/set/'.$key);
                $languageLinks[] = '<li class="'.$itemClass.'"><a class="language-link '.$linkClass.'" href="'.$url.'">'.ucfirst($value).'</a></li>';
            }

            $languageLinkString = implode($languageLinks);

            return $languageLinkString;
        }

        return '';
    }
1259364
public function getLanguageArray($iLanguage = null, $blOnlyActive = false, $blSort = false)
    {
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        if (is_null($iLanguage)) {
            $iLanguage = $this->_iBaseLanguageId;
        }

        $aLanguages = [];
        $aConfLanguages = $myConfig->getConfigParam('aLanguages');
        $aLangParams = $myConfig->getConfigParam('aLanguageParams');

        if (is_array($aConfLanguages)) {
            $i = 0;
            reset($aConfLanguages);
            foreach ($aConfLanguages as $key => $val) {
                if ($blOnlyActive && is_array($aLangParams)) {
                    //skipping non active languages
                    if (!$aLangParams[$key]['active']) {
                        $i++;
                        continue;
                    }
                }

                if ($val) {
                    $oLang = new stdClass();
                    $oLang->id = isset($aLangParams[$key]['baseId']) ? $aLangParams[$key]['baseId'] : $i;
                    $oLang->oxid = $key;
                    $oLang->abbr = $key;
                    $oLang->name = $val;

                    if (is_array($aLangParams)) {
                        $oLang->active = $aLangParams[$key]['active'];
                        $oLang->sort = $aLangParams[$key]['sort'];
                    }

                    $oLang->selected = (isset($iLanguage) && $oLang->id == $iLanguage) ? 1 : 0;
                    $aLanguages[$oLang->id] = $oLang;
                }
                ++$i;
            }
        }

        if ($blSort && is_array($aLangParams)) {
            uasort($aLanguages, [$this, '_sortLanguagesCallback']);
        }

        return $aLanguages;
    }
1063427
public function getList($LinodeID, $JobID = null, $pendingOnly = null)
    {
        return $this->call('linode.job.list', [
            'LinodeID'    => $LinodeID,
            'JobID'       => $JobID,
            'pendingOnly' => $pendingOnly,
        ]);
    }
75201
public function httpOnly($httpOnly = null)
    {
        if ($httpOnly !== null) {
            $this->httpOnly = (bool) $httpOnly;
        }

        return (bool) $this->httpOnly;
    }
1286695
public function getPageChildrenByidPage($id, $publishedOnly = 0)
	{
		$select = $this->tableGateway->getSql()->select();
		
		$select->columns(array('*'));
		
		$select->join('melis_cms_page_lang', 'melis_cms_page_lang.plang_page_id = melis_cms_page_tree.tree_page_id', 
						array('plang_lang_id'));
		$select->join('melis_cms_lang', 'melis_cms_lang.lang_cms_id = melis_cms_page_lang.plang_lang_id', 
						array('*'), $select::JOIN_LEFT);
		
		$select->join('melis_cms_page_published', 'melis_cms_page_published.page_id = melis_cms_page_tree.tree_page_id', 
						array('*'), $select::JOIN_LEFT);
		
		$select->join('melis_cms_page_style', 'melis_cms_page_tree.tree_page_id = melis_cms_page_style.pstyle_page_id', array(), $select::JOIN_LEFT);
		
		$select->join('melis_cms_style', ' melis_cms_style.style_id = melis_cms_page_style.pstyle_style_id', array('*'), $select::JOIN_LEFT);
		
		if ($publishedOnly == 1)
			$select->where('melis_cms_page_published.page_status=1');
		
		if ($publishedOnly == 0)
		{
    		$columns = $this->aliasColumnsFromTableDefinition('MelisEngine\MelisPageColumns', 's_');
		    $select->join('melis_cms_page_saved', 'melis_cms_page_saved.page_id = melis_cms_page_tree.tree_page_id',
					$columns, $select::JOIN_LEFT);
		}
		
		$select->join('melis_cms_page_seo', 'melis_cms_page_seo.pseo_id = melis_cms_page_tree.tree_page_id',
	       array('*'), $select::JOIN_LEFT);
		
		$select->join('melis_cms_page_default_urls', 'melis_cms_page_default_urls.purl_page_id = melis_cms_page_tree.tree_page_id',
	       array('*'), $select::JOIN_LEFT);
			
		$select->where('tree_father_page_id = ' . $id);
		$select->order('tree_page_order ASC');
		
		$resultSet = $this->tableGateway->selectWith($select);
		
		return $resultSet;
	}
1311359
public function setNames(Item $item, $body)
    {
        $names = [];
        // set a name based on the locale
        if ($this->locale == 'ru' && $body['russian']) {
            $names = array_merge(
                [$body['name']],
                $body['english'],
                $body['japanese'],
                $body['synonyms']
            );
            $item->setName($body['russian']);
        } elseif ($this->locale == 'ja' && $body['japanese']) {
            $item->setName(array_shift($body['japanese']));
            $names = array_merge(
                [$body['name']],
                [$body['russian']],
                $body['english'],
                $body['japanese'],
                $body['synonyms']
            );
        }

        // default list names
        if (!$item->getName()) {
            $names = array_merge(
                [$body['russian']],
                $body['english'],
                $body['japanese'],
                $body['synonyms']
            );
            $item->setName($body['name']);
        }

        foreach ($names as $value) {
            if ($value != $body['name']) {
                $item->addName((new Name())->setName($value));
            }
        }

        return $item;
    }
84697
public function multiGet(array $keys, $localOnly = false)
    {
        $keys = array_unique($keys);
        $results = array();
        $others = array();
        foreach ($keys as $key) {
            $cacheKey = $this->cacheKey($key);
            if ($this->keepLocalCache && array_key_exists($cacheKey, $this->localCache))
                $results[$cacheKey] = $this->localCache[$cacheKey];
            else
                $others[] = $cacheKey;
        }

        if(!$localOnly) {
            $results = array_merge($results, ($cached = $this->cacheStore->multiGet($others)) == false ? array() : $cached);
            if($this->keepLocalCache && !empty($cached))
		        foreach($cached as $key => $value)
			        $this->localCache[$key] = $value;

            unset($cached);
        }
        unset($keys);
        unset($others);


        return $results;
    }
1091217
public function hasItem(Item $item, bool $initialOnly = true): bool
    {
        $list = ($initialOnly) ? $this->initialItems : $this->items;
        foreach ($list as $my_item) {
            if (0 === Item::compare($my_item, $item)) {
                return true;
            }
        }
        return false;
    }
473804
public function getEntitiesByTypeAndLang($lang, $type)
    {
        $entities = collect();
        $collection = $this->model->where('entity_type', $type)->where('entity_data', 'LIKE', '%"lang":"'.$lang.'"%')->get();

        foreach ($collection as $item) {
            $instance = app($item->type)->attributes = $item->data;
            $entities->push($instance);
        }

        return $entities;
    }
941182
private function loadLanguageData(string $language = 'de')
  {
    if (\in_array($language, self::$availableLanguages, true) === false) {
      throw new StopWordsLanguageNotExists('language not supported: ' . $language);
    }

    $this->stopWords[$language] = $this->getData($language);
  }