Returns empty array, implements iBaseArticle interface getter method

@param bool $blActCats   select categories if all parents are active
@param bool $blSkipCache force reload or not (default false - no reload)

@return array
321196
public function getCategoryIds($blActCats = false, $blSkipCache = false)
    {
        $aCatIds = [];
        if ($oOrderArticle = $this->_getOrderArticle()) {
            $aCatIds = $oOrderArticle->getCategoryIds($blActCats, $blSkipCache);
        }

        return $aCatIds;
    }
1319342
public function getIncludable(bool $assoc = false): array
	{
		if ($this->includable === self::ALLOW_ALL) {
			return self::ALLOW_ALL;
		}

		return $assoc ? $this->includable : array_keys($this->includable);
	}
657967
public static function get_search_area_categories() {
        if (!isset(static::$searchareacategories)) {
            $categories = self::get_core_search_area_categories();

            // Go through all existing search areas and get categories they are assigned to.
            $areacategories = [];
            foreach (self::get_search_areas_list() as $searcharea) {
                foreach ($searcharea->get_category_names() as $categoryname) {
                    if (!key_exists($categoryname, $areacategories)) {
                        $areacategories[$categoryname] = [];
                    }

                    $areacategories[$categoryname][] = $searcharea;
                }
            }

            // Populate core categories by areas.
            foreach ($areacategories as $name => $searchareas) {
                if (key_exists($name, $categories)) {
                    $categories[$name]->set_areas($searchareas);
                } else {
                    throw new \coding_exception('Unknown core search area category ' . $name);
                }
            }

            // Get additional categories.
            $additionalcategories = self::get_additional_search_area_categories();
            foreach ($additionalcategories as $additionalcategory) {
                if (!key_exists($additionalcategory->get_name(), $categories)) {
                    $categories[$additionalcategory->get_name()] = $additionalcategory;
                }
            }

            // Remove categories without areas.
            foreach ($categories as $key => $category) {
                if (empty($category->get_areas())) {
                    unset($categories[$key]);
                }
            }

            // Sort categories by order.
            uasort($categories, function($category1, $category2) {
                return $category1->get_order() > $category2->get_order();
            });

            static::$searchareacategories = $categories;
        }

        return static::$searchareacategories;
    }
18671
public function getCategoriesFunction($locale, $parentKey = null)
    {
        return $this->memoizeCache->memoizeById(
            'sulu_categories',
            func_get_args(),
            function($locale, $parentKey = null) {
                $entities = $this->categoryManager->findChildrenByParentKey($parentKey);
                $categories = $this->categoryManager->getApiObjects($entities, $locale);
                $context = SerializationContext::create();
                $context->setSerializeNull(true);

                return $this->serializer->serialize($categories, 'array', $context);
            }
        );
    }
1365787
public function get_categories() {
        $data = $this->data;

        if (empty($data[Parser::INDEX_PARENT_SPEC])) {
            return array();
        }

        // Okay. We first grab all of our categories.
        $categories = array();
        foreach ($data[Parser::INDEX_PARENT_SPEC] as $category) {
            $categories[] = $this->api->get_category($category['value']);
        }

        return $categories;
    }
1165096
protected function getChildrenCategoryList($obCategoryItem, $sPageCode, $sURL)
    {
        if (empty($obCategoryItem) || $obCategoryItem->children->isEmpty()) {
            return [];
        }

        $arResult = [];
        foreach ($obCategoryItem->children as $obChildrenCategory) {
            $arMenuItem = $this->getCategoryMenuData($obChildrenCategory, $sPageCode, $sURL);
            if ($obChildrenCategory->children->isNotEmpty()) {
                $arMenuItem['items'] = $this->getChildrenCategoryList($obChildrenCategory, $sPageCode, $sURL);
            }

            $arResult[] = $arMenuItem;
        }

        return $arResult;
    }
488150
public function getArray($asAssoc = true)
    {
        // get all attribute names
        $attributes = $this->keys();
        $values = [];

        if (!empty($attributes)) {
            foreach ($attributes as $attribute) {
                $value = $this->get($attribute, false);

                if ($asAssoc === true) {
                    $values[$attribute] = $value;
                } else {
                    $values[] = $value;
                }
            }
        }

        return $values;
    }
1230522
public function getAkas()
        {
            if (true === $this->isReady) {
                $sCacheFile = $this->sRoot . '/cache/' . md5($this->iId) . '_akas.cache';
                $bUseCache = false;

                if (is_readable($sCacheFile)) {
                    $iDiff = round(abs(time() - filemtime($sCacheFile)) / 60);

                    if ($iDiff < $this->iCache || false) {
                        if (true === self::IMDB_DEBUG) {
                            echo '<pre><b>Using cache:</b> ' . basename($sCacheFile) . '</pre>';
                        }

                        $bUseCache = true;
                        $sSource = file_get_contents($sCacheFile);
                    }
                }

                if ($bUseCache) {
                    if (IMDB::IMDB_DEBUG) {
                        echo '<b>- Using cache for Akas from ' . $sCacheFile . '</b><br>';
                    }

                    $aRawReturn = file_get_contents($sCacheFile);
                    $aReturn = unserialize($aRawReturn);

                    return IMDBHelper::arrayOutput($this->bArrayOutput, $this->sSeparator, $this->sNotFound, $aReturn);
                } else {
                    $fullAkas = sprintf('http://www.imdb.com/title/tt%s/releaseinfo', $this->iId);
                    $aCurlInfo = IMDBHelper::runCurl($fullAkas);
                    $sSource   = $aCurlInfo['contents'];

                    if (false === $sSource) {
                        if (true === self::IMDB_DEBUG) {
                            echo '<pre><b>cURL error:</b> ' . var_dump($aCurlInfo) . '</pre>';
                        }

                        return false;
                    }

                    $aReturned = IMDBHelper::matchRegex($sSource, "~<td>(.*?)<\/td>\s+<td>(.*?)<\/td>~");

                    if ($aReturned) {
                        $aReturn = array();
                        foreach ($aReturned[1] as $i => $strName) {
                              if (strpos($strName,'(')===false) {
                                $aReturn[] = array(
                                    'title'     => IMDBHelper::cleanString($aReturned[2][$i]),
                                    'country'   => IMDBHelper::cleanString($strName)
                                );
                            }
                        }

                        file_put_contents($sCacheFile, serialize($aReturn));

                        return IMDBHelper::arrayOutput(
                            $this->bArrayOutput,
                            $this->sSeparator,
                            $this->sNotFound, $aReturn
                        );
                    }
                }
            }


            return IMDBHelper::arrayOutput(
                $this->bArrayOutput,
                $this->sSeparator,
                $this->sNotFound
            );
        }
633425
public function fetchAll(
        string $cacheKey = '',
        $ttl = 0,
        CacheInterface $cache = null
    ): array {
        return iterator_to_array($this->getIterator($cacheKey, $ttl, $cache));
    }
1170904
private function add_to_parent_category_branch($category, $newnode, &$categoriesbranch) {

        foreach ($categoriesbranch as $key => $branch) {
            if (!empty($branch['categoryid']) && $branch['categoryid'] == $category->parent) {
                // It may be empty (if it does not contain courses and this is the first child cat).
                if (!isset($categoriesbranch[$key]['branches'])) {
                    $categoriesbranch[$key]['branches'] = [];
                }
                $categoriesbranch[$key]['branches'][] = $newnode;
                return true;
            }
            if (!empty($branch['branches'])) {
                $parent = $this->add_to_parent_category_branch($category, $newnode, $categoriesbranch[$key]['branches']);
                if ($parent) {
                    return true;
                }
            }
        }

        return false;
    }
503883
protected function getSelectedCategory($categorySlug = null)
    {
        $selectedCategory = null;

        if ($categorySlug !== null) {
            $selectedCategory = $this->getCategoryRepository()->findOneBy(array('isActive' => true, 'slug' => $categorySlug));
        }

        return $selectedCategory;
    }
507367
public function getParents()
    {
        $parents = $this()->beColl();

        $category = $this;
        while ($parent = $category->getParent()->find()) {
            $parents[] = $category = $parent;
        }

        return $parents;
    }
601196
protected function GetListBaseQueryRestrictedToCategories(&$oListConfig, $aCategoryList = null)
    {
        $aCustRestriction = array();

        // get category products
        $categories = $oListConfig->GetMLTIdList('shop_category_mlt');

        $databaseConnection = $this->getDatabaseConnection();
        $quotedListConfigId = $databaseConnection->quote($oListConfig->id);
        $quotedCategories = implode(',', array_map(array($databaseConnection, 'quote'), $categories));

        $sQuery = "SELECT DISTINCT `shop_module_article_list_article`.`name` AS conf_alternativ_header, (-1*`shop_module_article_list_article`.`position`) AS cms_search_weight, `shop_article`.*
                 FROM `shop_article`
            LEFT JOIN `shop_article_shop_category_mlt` ON `shop_article`.`id` = `shop_article_shop_category_mlt`.`source_id`
            LEFT JOIN `shop_article_stats` ON `shop_article`.`id` = `shop_article_stats`.`shop_article_id`
            LEFT JOIN `shop_article_stock` ON `shop_article`.`id` = `shop_article_stock`.`shop_article_id`
            LEFT JOIN `shop_module_article_list_article` ON (`shop_module_article_list_article`.`shop_module_article_list_id` = $quotedListConfigId AND `shop_article`.`id` = `shop_module_article_list_article`.`shop_article_id`)
              ";
        if (count($categories) > 0) {
            $aCustRestriction[] = "`shop_article_shop_category_mlt`.`target_id` IN ($quotedCategories)";
        }

        $manuallySelectedArticles = &$oListConfig->GetFieldShopModuleArticleListArticleList();
        if ($manuallySelectedArticles->Length() > 0) {
            $aCustRestriction[] = "`shop_module_article_list_article`.`shop_module_article_list_id` = $quotedListConfigId";
        }

        // get warengruppen
        $productGroupRestriction = $oListConfig->GetMLTIdList('shop_article_group_mlt');
        if (count($productGroupRestriction) > 0) {
            $sQuery .= ' LEFT JOIN `shop_article_shop_article_group_mlt` ON `shop_article`.`id` = `shop_article_shop_article_group_mlt`.`source_id` ';
            $productGroupRestriction = implode(',', array_map(array($databaseConnection, 'quote'), $productGroupRestriction));
            $aCustRestriction[] = "`shop_article_shop_article_group_mlt`.`target_id` IN ($productGroupRestriction)";
        }

        $sCustQuery = 'WHERE 1=0';
        if (count($aCustRestriction) > 0) {
            $sCustQuery = 'WHERE ('.implode("\nOR ", $aCustRestriction).')';
        }
        if (null !== $aCategoryList) {
            $escapedCategoryList = implode(',', array_map(array($databaseConnection, 'quote'), $aCategoryList));
            $sCustQuery .= " AND (`shop_article_shop_category_mlt`.`target_id` IN ($escapedCategoryList))";
        }
        $sQuery .= $sCustQuery;

        return $sQuery;
    }
685448
protected function _getLangTranslationArray($iLang = null, $blAdmin = null, $aLangFiles = null)
    {
        startProfile("_getLangTranslationArray");

        $blAdmin = isset($blAdmin) ? $blAdmin : $this->isAdmin();
        $iLang = $this->_getCacheLanguageId($blAdmin, $iLang);
        $sCacheName = $this->_getLangFileCacheName($blAdmin, $iLang, $aLangFiles);

        if (!isset($this->_aLangCache[$sCacheName])) {
            $this->_aLangCache[$sCacheName] = [];
        }
        if (!isset($this->_aLangCache[$sCacheName][$iLang])) {
            // loading main lang files data
            $this->_aLangCache[$sCacheName][$iLang] = $this->_getLanguageFileData($blAdmin, $iLang, $aLangFiles);
        }

        stopProfile("_getLangTranslationArray");

        // if language array exists ..
        return (isset($this->_aLangCache[$sCacheName][$iLang]) ? $this->_aLangCache[$sCacheName][$iLang] : []);
    }
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;
    }
370529
public function get_category($key = 0)
	{
		$categories = $this->get_categories();
		if (isset($categories[$key]))
		{
			return $categories[$key];
		}
		else
		{
			return null;
		}
	}
190747
public function getParents ($category)
		{
			if ($category instanceof $this->_modelClass)
			{
				$parents = [];
				foreach ($this->_data as $item)
					if ($category->lft > $item->lft and $category->rgt < $item->rgt)
						$parents[] = $item;

				return $parents;
			}

			return null;
		}