Get the category IDs of the current news item.

@return array
546251
protected function getCurrentNewsCategories()
    {
        if (!($alias = Input::getAutoItem('items', false, true))
            || null === ($news = NewsModel::findPublishedByParentAndIdOrAlias($alias, $this->news_archives))
        ) {
            return [];
        }

        $ids = Model::getRelatedValues('tl_news', 'categories', $news->id);
        $ids = \array_map('intval', \array_unique($ids));

        return $ids;
    }
1184698
protected function getModelIds()
    {
        $ids = [];

        foreach ($this->models as $model) {
            /** @var ModelInterface $model */
            $ids[] = $model->getId();
        }

        return $ids;
    }
92133
public function selectCategories()
    {
        $temp = [];
        $category = $this->category->scopeQuery(function ($query) {
            return $query->whereStatus('Show')->orderBy('name', 'ASC');
        })->all();

        foreach ($category as $key => $value) {
            $temp[$value->id] = ucfirst($value->name);
        }

        return $temp;
    }
1366168
public function getNews()
    {
        if ($this->_oNewsList === null) {
            $this->_oNewsList = false;

            $iPerPage = (int) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iNrofCatArticles');
            $iPerPage = $iPerPage ? $iPerPage : 10;

            $oActNews = oxNew(\OxidEsales\Eshop\Application\Model\NewsList::class);

            if ($iCnt = $oActNews->getCount()) {
                $this->_iCntPages = ceil($iCnt / $iPerPage);
                $oActNews->loadNews($this->getActPage() * $iPerPage, $iPerPage);
                $this->_oNewsList = $oActNews;
            }
        }

        return $this->_oNewsList;
    }
986875
public function getAllNodeIds()
    {
        $ret = [];
        foreach ($this->items as $item) {
          $ret[] = $item->getNodeId();
        }
        return $ret;
    }
1321434
private function getCurrentCategory()
    {
        $category = $this->context->getCurrentCategory();

        if (null === $category) {
            $category = $this->categoryRepository->get(
                $this->storeManager->getStore()->getRootCategoryId(),
                $this->storeManager->getStore()->getId()
            );
        }

        return $category;
    }
86447
public static function getCategories()
    {
        $app = App::getInstance();

        $manager = BaseManager::build('FelixOnline\Core\Category', 'category');

        try {
            $values = $manager->filter('hidden = 0')
                            ->filter('deleted = 0')
                            ->filter('id > 0')
                            ->order('order', 'ASC')
                            ->values();

            return $values;
        } catch (\Exception $e) {
            return array();
        }
    }
2443
public function category()
    {
        $category   = $this->param('category_id', 0);
        $categoryId = explode(':', $category)[0];

        return Category::query()->findOrNew($categoryId);
    }
882016
public function getCategories()
    {
        $categoryEntities = $this->entity->getCategories();

        $categories = [];
        if ($categoryEntities) {
            foreach ($categoryEntities as $categoryEntity) {
                $categories[] = new Category($categoryEntity, $this->locale);
            }
        }

        return $categories;
    }
48426
public function getAllCategories()
    {
        $categories = $this->exists ? self::whereNotIn('id', [$this->id])->get() : self::get();

        return $categories->mapWithKeys(function ($item) {
            return [$item->id => $item->term->GetContent('name')];
        })->toArray();
    }
1144998
protected function category() : array
	{
		$category = explode('|', urldecode($this->data->get('category')));

		return [
			'category' => isset($category[0]) ? $category[0] : 1,
			'category_name' => isset($category[1]) ? $category[1] : '',
		];
	}
1171269
function getCategories()
    {
        $result = $this->db->query('SELECT * FROM category');

        $data = [];
        if (isset($result[0])) {
            foreach ($result as $v) {
                $data[$v->get('id')] = $v->get('name');
            }
        }
        return $data;
    }
1033971
public function getSimilarRecommListIds()
    {
        if ($this->_aSimilarRecommListIds === null) {
            $this->_aSimilarRecommListIds = false;

            if ($categoryArticlesList = $this->getArticleList()) {
                $this->_aSimilarRecommListIds = $categoryArticlesList->arrayKeys();
            }
        }

        return $this->_aSimilarRecommListIds;
    }
78492
public static function categoryList()
    {
        $data = self::find()->orderBy('category')->groupBy(['category'])->select(['category'])->column();
        return array_combine($data, $data);
    }
907964
public function getCategories()
    {
        if (null === $this->_categories) {

            $collection = Mage::getModel('catalog/category')->getCollection();

            $pathLike = Mage_Catalog_Model_Category::TREE_ROOT_ID . '/' . Mage::app()->getStore()->getRootCategoryId() . '/%';
            $collection
                ->initCache(Mage::app()->getCacheInstance(), self::class, [Mage_Catalog_Model_Category::CACHE_TAG])
                ->setStoreId(Mage::app()->getStore()->getId())
                ->addAttributeToSelect('*')
                ->addFieldToFilter('path', [
                    'like' => $pathLike,
                ])
                ->addIsActiveFilter()
                ->addAttributeToFilter('include_in_menu', 1)
                ->joinUrlRewrite();

            // Sort
            $collection->getSelect()->reset(Zend_Db_Select::ORDER);
            $collection
                ->addOrder('position', Varien_Data_Collection_Db::SORT_ORDER_ASC);

            foreach ($collection as $id => $category) {
                $this->_categories[$id] = $category;
            }
        }

        return $this->_categories;
    }
1079658
protected function forCategories() : array
	{
		$categories = $this->products->pluck('category');

		return $categories->mapWithKeys(function ($item) use ($categories) {

				$result[$item->id] = [
					'id' => $item->id,
					'name' => $item->name,
					'qty' => $categories->where('id', $item->id)->count()
				];

				return $result;
		})->all();
	}
1246973
protected function getSelectedIds()
    {
        $ids = array();
        foreach ($_REQUEST as $parameter => $value) {
            $matches = array();
            preg_match('/select_(.*)/', $parameter, $matches);
            if ($matches) {
                $ids[] = $matches[1];
            }
        }

        return $ids;
    }