@see https://www.mediawiki.org/wiki/API:Categoryinfo

@return array
345151
protected function getCategoryinfoResponse()
    {
        $this->logger->debug('Base:getCategoryinfoResponse');
        $this->setParam('prop', 'categoryinfo');
        $this->send();
        return Tools::flatten($this->getResponse(['query', 'pages']));
    }
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();
	}
316651
private function getAllInfo()
    {
        $data = [];
        $result_table = $this->_parser->find('table', 0);
        $result_area = $result_table->find('tr', 0)->next_sibling();
        while (true) {
            $result = [];

            $name_area = $result_area->find('td', 1);

            $result['image'] = $this->getImage($result_area);
            $result['id'] = $this->getId($name_area);
            $result['name'] = $this->getName($name_area);
            $result['nickname'] = $this->getNickname($name_area);

            if ($this->_type == 'character') {
                $role = $this->getRole($result_area);
                $result = array_merge($result, $role);
            }

            $data[] = $result;

            $result_area = $result_area->next_sibling();
            if (!$result_area) {
                break;
            }
        }

        return $data;
    }
72066
public function getCategoryProgramInfo() {
    $data = [];
    $cid = 'openy_activity_finder:activity_program_info';
    if ($cache = $this->cache->get($cid)) {
      $data = $cache->data;
    }
    else {
      $nids = $this->entityQuery
        ->get('node')
        ->condition('type','program_subcategory')
        ->execute();
      $nids_chunked = array_chunk($nids, 20, TRUE);
      foreach ($nids_chunked as $chunked) {
        $program_subcategories = $this->entityTypeManager->getStorage('node')->loadMultiple($chunked);
        if (!empty($program_subcategories)) {
          foreach ($program_subcategories as $program_subcategory_node) {
            if ($program_node = $program_subcategory_node->field_category_program->entity) {
              $data[$program_subcategory_node->id()] = [
                'title' => $program_subcategory_node->title->value,
                'program' => [
                  'nid' => $program_node->id(),
                  'title' => $program_node->title->value,
                ],
              ];
            }
          }
        }
      }

      $expire = $this->time->getRequestTime() + self::CACHE_TTL;
      $this->cache->set($cid, $data, $expire);
    }

    return $data;
  }
1126527
protected function getListCategoryGroup()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;

        return $this->category_group->getList($conditions);
    }
882016
public function getCategories()
    {
        $categoryEntities = $this->entity->getCategories();

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

        return $categories;
    }
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] : '',
		];
	}
1038089
public function getList()
    {
        $category = $this->getCategory();

        $list = $this->getCategoryConfig($category);

        foreach ($list as $context => $config) {
            $list[$context] = $this->getAll($context);
        }

        return $list;
    }
528700
private function loadCategoryDetails($category)
    {
        if (is_array($category) && is_array(array_values($category)[0])) {
            return $category;
        }

        if (!is_array($category)) {
            $tmp = $category;
            $category = [];
            $category[] = $tmp;
        }

        $categorys = [];
        foreach ($category as $catKey) {
            if (isset($this->category[$catKey])) {
                $key = $this->category[$catKey];
                $categorys[$catKey] = $this->meta[$key];
            } else {
                $categorys[$catKey]["key"] = $catKey;
            }
        }

        return $categorys;
    }
433447
protected function getProcessedCategoryIds()
    {
        $categoryIds = [];
        $source = $this->getSource();

        $source->rewind();
        while ($source->valid()) {
            $current = $source->current();
            if (isset($this->newCategory[$current[self::COL_ROOT]][$current[self::COL_CATEGORY]])) {
                $categoryIds[] = $this->newCategory[$current[self::COL_ROOT]][$current[self::COL_CATEGORY]];
            } elseif (isset($this->categoriesWithRoots[$current[self::COL_ROOT]][$current[self::COL_CATEGORY]])) {
                $categoryIds[] = $this->categoriesWithRoots[$current[self::COL_ROOT]][$current[self::COL_CATEGORY]];
            }

            $source->next();
        }

        return $categoryIds;
    }
441613
public function query() : array
    {
        $categories = Category::where('parent_id', null)->with('allChildrenTerm')->get();
        $allCategories = collect();

        foreach ($categories as $category) {
            $allCategories = $allCategories->merge($this->getCategory($category));
        }

        return [
            'category' => $allCategories,
        ];
    }
621140
public function getByCategoryID($iCategoryID)
    {
        if (empty($iCategoryID)) {
            return [];
        }

        //Get category data
        $this->addCategoryData($iCategoryID, true);
        $this->arResult = array_reverse($this->arResult);

        return $this->arResult;
    }
1299716
protected function getModuleInfo(): array
    {
        if ($this->moduleInfo === null) {
            $this->moduleInfo = $this->package()->getExtra()['module'] ?? [];
        }

        return $this->moduleInfo;
    }
873424
private function getAllInfo()
    {
        $data = [
            'id'           => $this->getId(),
            'image'        => $this->getImage(),
            'nickname'     => $this->getNickname(),
            'name'         => $this->getName(),
            'name_kanji'   => $this->getName(true),
            'favorite'     => $this->getFavorite(),
            'about'        => $this->getAbout(),
            'animeography' => $this->getMedia('anime'),
            'mangaography' => $this->getMedia('manga'),
            'va'           => $this->getVa(),
        ];

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

        return $this->_oCatList;
    }
193473
public function getCategoryTitle()
    {
        $this->categoryTitle = $this->category ? $this->category->getTitle() : null;

        return $this->categoryTitle;
    }
142031
private function getCategoryVariables()
    {
        $variables = [];

        if ($this->registry->registry('current_category')) {
            $category = $this->registry->registry('current_category');
            $variables['category.id']    = $category->getId();
            $variables['category.label'] = $category->getName();
            $variables['category.path']  = $category->getPath();
        }

        return $variables;
    }