Represents the "get_categories" action.

@throws ShopgateLibraryException
@see http://wiki.shopgate.com/Shopgate_Plugin_API_get_categories
15408
protected function getReviews()
    {
        $limit        = isset($this->params['limit'])
            ? (int)$this->params['limit']
            : null;
        $offset       = isset($this->params['offset'])
            ? (int)$this->params['offset']
            : null;
        $uids         = isset($this->params['uids'])
            ? (array)$this->params['uids']
            : array();
        $responseType = isset($this->params['response_type'])
            ? $this->params['response_type']
            : false;

        $supportedResponseTypes = $this->config->getSupportedResponseTypes();
        if (!empty($responseType) && !in_array($responseType, $supportedResponseTypes['get_reviews'])) {
            throw new ShopgateLibraryException(
                ShopgateLibraryException::PLUGIN_API_UNSUPPORTED_RESPONSE_TYPE,
                'Requested type: "' . $responseType . '"'
            );
        }

        $this->plugin->startGetReviews($limit, $offset, $uids, $responseType);

        switch ($responseType) {
            default:
            case 'xml':
                $response     = new ShopgatePluginApiResponseAppXmlExport($this->trace_id);
                $responseData = $this->config->getReviewsXmlPath();
                break;

            case 'json':
                $response     = new ShopgatePluginApiResponseAppJsonExport($this->trace_id);
                $responseData = $this->config->getReviewsJsonPath();
                break;
        }

        if (empty($this->response)) {
            $this->response = $response;
        }

        $this->responseData = $responseData;
    }
1367382
protected function getListCategory()
    {
        $conditions = $this->query_filter;
        $conditions['category_group_id'] = $this->data_category_group['category_group_id'];
        $list = $this->category->getTree($conditions);

        $this->prepareListCategory($list);
        return $list;
    }
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;
    }
220001
public function categories()
    {
        $resource = '/venues/categories';
        $response = $this->makeApiRequest($resource);

        if(property_exists($response, 'categories')) {
            return $response->categories;
        }

        return array();
    }
752712
public function getActiveCategory()
    {
        if ($this->_oActCategory === null) {
            $this->_oActCategory = false;
            $category = oxNew(\OxidEsales\Eshop\Application\Model\Category::class);
            if ($category->load($this->getCategoryId())) {
                $this->_oActCategory = $category;
            }
        }

        return $this->_oActCategory;
    }
1106368
public function getCategory($v)
    {
        $v = $this->buildCategoryId($v);

        return isset($this->categories[$v]) ? $this->categories[$v] : null;
    }
287832
public function getCategories()
    {
        if ($this->categories) {
            return $this->categories;
        }

        $navs = $categories = $subCategories = [];
        $this->event->trigger('adminNavGetNavs', [&$navs, &$categories, &$subCategories]);

        $categories = $this->combine($categories, $subCategories, $navs);
        $categories = $this->filter($categories);
        $categories = $this->sort($categories);

        $this->categories = $categories;

        return $categories;
    }
1007553
private function getCategoryNameById($categoryId, $storeId)
    {
        if (!isset($this->categoryNames[$categoryId])) {
            $categoryResource = $this->categoryResource;
            $this->categoryNames[$categoryId] = $categoryResource->getAttributeRawValue($categoryId, "name", $storeId);
        }

        return $this->categoryNames[$categoryId];
    }
259543
public function getCategoriesAttribute()
    {
        // Request category only if post type uses categories
        $getPostType = getPostType($this->getTable());

        if($getPostType->hasCategories) {
            return $this->getRelationValue('categories');
        }
        return null;
    }
734284
public ApiSuccessResponse getRootCategories(GetRootCategoriesData getRootCategoriesData) throws ApiException {
        ApiResponse<ApiSuccessResponse> resp = getRootCategoriesWithHttpInfo(getRootCategoriesData);
        return resp.getData();
    }
1300513
private function getSearchableCategories($storeId, $categoryIds = null, $fromId = 0, $limit = 100)
    {
        return $this->resourceModel->getSearchableCategories($storeId, $categoryIds, $fromId, $limit);
    }
1056226
protected function magic_get_category() {
        $this->ensure_category_loaded();
        if (!empty($this->_categories)) {
            return reset($this->_categories);
        } else {
            return null;
        }
    }
993418
public function get_categories_with_fields() : array {
        if ($this->categories === null) {
            $this->categories = api::get_categories_with_fields($this->get_component(), $this->get_area(), $this->get_itemid());
        }
        $handler = $this;
        array_walk($this->categories, function(category_controller $c) use ($handler) {
            $c->set_handler($handler);
        });
        return $this->categories;
    }
398176
public function getStoreCategoriesAjax()
    {
        if (!$this->access('category')) {
            return array('error' => $this->text('No access'));
        }

        $options = array(
            'store_id' => $this->getPosted('store_id', $this->store->getDefault())
        );

        return $this->getCategoryOptionsByStore($this->category, $this->category_group, $options);
    }
354070
protected function _getCategoryList()
    {
        if ($this->_oCatList == null) {
            $this->_oCatList = oxNew(\OxidEsales\Eshop\Application\Model\CategoryList::class);
            $this->_oCatList->updateCategoryTree(false);
        }

        return $this->_oCatList;
    }
257263
private function get_category( $post_id ) {
		$category_data = get_the_category( $post_id );
		$category_arr  = [];
		foreach ( $category_data as $cat ) {
			array_push( $category_arr, $cat->term_id );
		}

		return $category_arr;
	}
1295603
public function catarts()
    {
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('bl_rssCategories')) {
            $oCat = oxNew(\OxidEsales\Eshop\Application\Model\Category::class);
            if ($oCat->load(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('cat'))) {
                $this->_getRssFeed()->loadCategoryArticles($oCat);
            }
        } else {
            error_404_handler();
        }
    }