return a list of association categories

@return SimpleXMLElement XML data
546492
public function getAssociationCategories()
    {
        $url = $this->getBaseApiUrl() . '/meta/association/categories';

        $xml = $this->queryXml($url);
        return $xml->metalist;
    }
886173
public function getAffectedEntityIds()
    {
        $categoryIds = [];
        while ($bunch = $this->_dataSourceModel->getNextBunch()) {
            foreach ($bunch as $rowNum => $rowData) {
                $this->filterRowData($rowData);
                if (!$this->isRowAllowedToImport($rowData, $rowNum)) {
                    continue;
                }
                if (!isset($this->newCategory[$rowData[self::COL_ROOT]][$rowData[self::COL_CATEGORY]]['entity_id'])) {
                    continue;
                }
                $categoryIds[] = $this->newCategory[$rowData[self::COL_ROOT]][$rowData[self::COL_CATEGORY]]['entity_id'];
            }
        }
        return $categoryIds;
    }
815736
private function _associations_names()
    {
        $associations = array();
        foreach ($this->associations() as $assocs) {
            foreach ($assocs as $k => $v)
                $associations[] = is_int($k) ? $v : $k;
        }
        return $associations;
    }
59844
public function getCategoryIds()
    {
        return array_keys((new CmsCategoryRelationQuery)
                ->join('cms_category')->on('cms_category_id')
                ->whereObject()->equals($this->_object)
                ->andFieldObjectId()->equals($this->_objectId)
                ->findPairs('cms_category.id', 'cms_category.id'));
    }
988927
public function getCategory()
    {
        try {
            $category = $this->coreRegistry->registry('current_category');
            if ($category instanceof CategoryModel) {
                $categoryList = [];

                $categoryIds = $this->removeDefaultCategories($category->getPathIds());

                $linkField = 'entity_id';
                if (class_exists('Magento\Framework\EntityManager\MetadataPool')) {
                    // @codingStandardsIgnoreLine
                    $metadataPool = $this->objectManager->create(
                        'Magento\Framework\EntityManager\MetadataPool'
                    );
                    $linkField = $metadataPool->getMetadata(CategoryInterface::class)->getLinkField();
                }

                /** @var \Magento\Catalog\Model\ResourceModel\Category\Collection $categoryCollection */
                $categoryCollection = $this->categoryCollectionFactory->create()
                    ->setStore($this->storeManager->getStore())
                    ->addAttributeToSelect('name')
                    ->addFieldToFilter($linkField, ['in' => $categoryIds]);

                /** @var Category $category */
                foreach ($categoryCollection as $categoryItem) {
                    $categoryList[] = $categoryItem->getName();
                }

                return [
                    'names' => $categoryList,
                    'ids'   => $categoryIds,
                ];
            }
        } catch (\Exception $e) {
            throw $e;
        }
        return false;
    }
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,
        ];
    }
608774
private function getCategoryIdentities()
    {
        $identities  = [];
        $categoryIds = [];
        $origData    = $this->optimizer->getOrigData();
        $data        = $this->optimizer->getData();

        // If optimizer was previously assigned to all categories, or is now set to all categories.
        $isAppliedToAllCategories = empty($data['catalog_view_container'])
            || (bool) $data['catalog_view_container']['apply_to'] === false;

        $wasAppliedToAllCategories = empty($origData['catalog_view_container']['category_ids']);

        if ($isAppliedToAllCategories || $wasAppliedToAllCategories) {
            $identities[] = \Magento\Catalog\Model\Category::CACHE_TAG;
        }

        if (!empty($data['catalog_view_container']['category_ids'])) {
            $categoryIds = array_merge($categoryIds, $data['catalog_view_container']['category_ids']);
        }

        if (!empty($origData['catalog_view_container']['category_ids'])) {
            $categoryIds = array_merge($categoryIds, $origData['catalog_view_container']['category_ids']);
        }

        $categoryIds = array_filter(array_unique($categoryIds));
        if (!empty($categoryIds)) {
            $categoryTags = array_map(function ($categoryId) {
                return \Magento\Catalog\Model\Category::CACHE_TAG . '_' . $categoryId;
            }, $categoryIds);

            $identities = array_merge($identities, $categoryTags);
        }

        return $identities;
    }
78916
public function getCategoriesPlain() : Collection
    {
        static $categories;

        if ($categories) {
            return $categories;
        }

        $categories = [];
        $languages = TransHelper::getAllLanguages();

        foreach (Category::all() as $category) {
            $categoryData = [
                'id'        => $category->id,
                'parent_id' => $category->parent_id,
                'slugs'     => [],
            ];

            foreach ($languages as $language) {
                $translation = $category->translations->where('locale', $language->iso_code)->first();
                $slug = object_get($translation, 'slug');

                $categoryData['slugs'][$language->iso_code] = $slug;
            }

            $categories[] = $categoryData;
        }

        $categories = collect($categories);

        return $categories;
    }
140287
public function getAttributes()
    {
        return [
            Attributes\IdAttribute::make(),
            Attributes\TextAttribute::make('name')
                ->setRequired(true),
            Attributes\TextAttribute::make('code'),
            Attributes\BelongsToAttribute::make('legal_entity_id')
                ->setRelationName('legal_entity')
                ->setRelationManager(LegalEntityManager::class),
            Attributes\CreatedAtAttribute::make(),
            Attributes\UpdatedAtAttribute::make(),
            Attributes\DeletedAtAttribute::make(),
        ];
    }
623933
public function getAttributes()
    {
        return [
            Attributes\IdAttribute::make(),
            Attributes\TextAttribute::make('name')
                ->setRequired(true)
                ->setUnique(true),
            Attributes\LongTextAttribute::make('description'),
            Attributes\TextAttribute::make('filename')
                ->setRequired(true),
            Attributes\EnumAttribute::make('filetype', array_keys(Config::get('amethyst.template.generators', [])))
                ->setRequired(true),
            Attributes\LongTextAttribute::make('content'),
            AmethystAttributes\FileChecksumAttribute::make('checksum'),
            Attributes\BelongsToAttribute::make('data_builder_id')
                ->setRelationName('data_builder')
                ->setRelationManager(DataBuilderManager::class),
            Attributes\CreatedAtAttribute::make(),
            Attributes\UpdatedAtAttribute::make(),
            Attributes\DeletedAtAttribute::make(),
        ];
    }
1002474
public function get_categories()
	{
		$categories = array();

		$type = 'category';
		foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, $type) as $category)
		{
			$term = null;
			$scheme = null;
			$label = null;
			if (isset($category['attribs']['']['term']))
			{
				$term = $this->sanitize($category['attribs']['']['term'], SIMPLEPIE_CONSTRUCT_HTML);
			}
			if (isset($category['attribs']['']['scheme']))
			{
				$scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_HTML);
			}
			if (isset($category['attribs']['']['label']))
			{
				$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_HTML);
			}
			$categories[] = $this->registry->create('Category', array($term, $scheme, $label, $type));
		}
		foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, $type) as $category)
		{
			// This is really the label, but keep this as the term also for BC.
			// Label will also work on retrieving because that falls back to term.
			$term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_HTML);
			if (isset($category['attribs']['']['domain']))
			{
				$scheme = $this->sanitize($category['attribs']['']['domain'], SIMPLEPIE_CONSTRUCT_HTML);
			}
			else
			{
				$scheme = null;
			}
			$categories[] = $this->registry->create('Category', array($term, $scheme, null, $type));
		}

		$type = 'subject';
		foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, $type) as $category)
		{
			$categories[] = $this->registry->create('Category', array($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_HTML), null, null, $type));
		}
		foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, $type) as $category)
		{
			$categories[] = $this->registry->create('Category', array($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_HTML), null, null, $type));
		}

		if (!empty($categories))
		{
			return array_unique($categories);
		}
		else
		{
			return null;
		}
	}
825225
public function getCategories()
    {
        return (new CmsCategoryQuery)
                ->join('cms_category_relation')->on('id', 'cms_category_id')
                ->where('object', 'cms_category_relation')->equals($this->_object)
                ->where('objectId', 'cms_category_relation')->equals($this->_objectId)
                ->find();
    }
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;
    }
283411
public function getAllChildren() {
    // Define as array.
    $options = [];

    // Fetch main categories.
    foreach (array_keys($this->getCategories()) as $category) {
      $options = array_merge($options, $this->getChildren($category));
    }
    // Return array.
    return $options;
  }
566639
public function getCategories()
    {
        if (is_null($this->_aCatIds)) {
            $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
            $sQ = "select oxobjectid from oxobject2delivery where oxdeliveryid=" . $oDb->quote($this->getId()) . " and oxtype = 'oxcategories'";
            $aCatIds = $oDb->getCol($sQ);
            $this->_aCatIds = $aCatIds;
        }

        return $this->_aCatIds;
    }
625178
@Override
    public List<Category> getCategories() {
        return categories == null ? (categories = new ArrayList<Category>()) : categories;
    }
151596
public function asXML()
    {
        $xml = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8" ?><item></item>',
            LIBXML_NOERROR | LIBXML_ERR_NONE | LIBXML_ERR_FATAL);
        $xml->addChild('title', $this->title);
        $xml->addChild('link', $this->url);
        if ($this->pubDate !== null) {
            $xml->addChild('pubDate', date(DATE_RSS, $this->pubDate));
        }

        if ($this->creator) {
            $xml->addChildCData("xmlns:dc:creator", $this->creator);
        }
        if ($this->guid) {
            $guid = $xml->addChild('guid', $this->guid);

            if ($this->isPermalink === false) {
                $guid->addAttribute('isPermaLink', 'false');
            }
        }

        foreach ($this->categories as $category) {
            $element = $xml->addChild('category', $category[0]);

            if (isset($category[1])) {
                $element->addAttribute('domain', $category[1]);
            }
        }

        $xml->addChild('description', $this->description);
        if(strlen(trim($this->content)) > 0) {
            $xml->addChildCData('xmlns:content:encoded', $this->content);
        }

        if (is_array($this->enclosure) && (count($this->enclosure) == 3)) {
            $element = $xml->addChild('enclosure');
            $element->addAttribute('url', $this->enclosure['url']);
            $element->addAttribute('type', $this->enclosure['type']);

            if ($this->enclosure['length']) {
                $element->addAttribute('length', $this->enclosure['length']);
            }
        }

        return $xml;
    }