Get categories as keywords

@return array Each entry in the array should be a seperate keyword
778335
public function getKeywords()
    {
        $return  = array();
        $keywords = $this->entry->get_categories();
        if (is_array($keywords) && count($keywords) > 0) {
            foreach ($keywords as $keyword) {
                $return[] = $this->decodeString($keyword->get_label());
            }
        }

        return $return;
    }
1340327
public function getCategories()
    {
        // Set method and action
        $method = 'import';
        $action = 'getSupplierCategories';

        // Set data
        $data = array();

        // Send request and retrieve response
        $result = Dispatcher::send($method, $action, $data);

        return $result;
    }
202279
public static function getKeywords()
    {
        static $keywords = null;

        if ($keywords === null) {
            $keywords = [];

            $keywordsStrings = [
                'T_ABSTRACT', 'T_ARRAY', 'T_AS', 'T_BREAK', 'T_CALLABLE', 'T_CASE',
                'T_CATCH', 'T_CLASS', 'T_CLONE', 'T_CONST', 'T_CONTINUE', 'T_DECLARE', 'T_DEFAULT', 'T_DO',
                'T_ECHO', 'T_ELSE', 'T_ELSEIF', 'T_EMPTY', 'T_ENDDECLARE', 'T_ENDFOR', 'T_ENDFOREACH',
                'T_ENDIF', 'T_ENDSWITCH', 'T_ENDWHILE', 'T_EVAL', 'T_EXIT', 'T_EXTENDS', 'T_FINAL',
                'T_FINALLY', 'T_FOR', 'T_FOREACH', 'T_FUNCTION', 'T_GLOBAL', 'T_GOTO', 'T_HALT_COMPILER',
                'T_IF', 'T_IMPLEMENTS', 'T_INCLUDE', 'T_INCLUDE_ONCE', 'T_INSTANCEOF', 'T_INSTEADOF',
                'T_INTERFACE', 'T_ISSET', 'T_LIST', 'T_LOGICAL_AND', 'T_LOGICAL_OR', 'T_LOGICAL_XOR',
                'T_NAMESPACE', 'T_NEW', 'T_PRINT', 'T_PRIVATE', 'T_PROTECTED', 'T_PUBLIC', 'T_REQUIRE',
                'T_REQUIRE_ONCE', 'T_RETURN', 'T_STATIC', 'T_SWITCH', 'T_THROW', 'T_TRAIT', 'T_TRY',
                'T_UNSET', 'T_USE', 'T_VAR', 'T_WHILE', 'T_YIELD',
            ];

            foreach ($keywordsStrings as $keywordName) {
                if (defined($keywordName)) {
                    $keyword = constant($keywordName);
                    $keywords[$keyword] = $keyword;
                }
            }
        }

        return $keywords;
    }
1235933
private function extractCategories()
   {

      $this->_categories = [];

      foreach ( $this->_translations as $identifier => $translationData )
      {
         if ( ! \is_array( $translationData ) )
         {
            continue;
         }
         if ( ! empty( $translationData[ 'category' ] ) )
         {
            $this->_categories[] = $translationData[ 'category' ];
         }
      }

      $this->_categories = \array_unique( $this->_categories );

   }
606039
final public function getReservedKeywordsList()
    {
        // Check for an existing instantiation of the keywords class.
        if ($this->_keywords) {
            return $this->_keywords;
        }

        $class    = $this->getReservedKeywordsClass();
        $keywords = new $class();
        if (! $keywords instanceof KeywordList) {
            throw DBALException::notSupported(__METHOD__);
        }

        // Store the instance so it doesn't need to be generated on every request.
        $this->_keywords = $keywords;

        return $keywords;
    }
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'));
    }
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;
    }
13873
public function getPageKeywords()
    {
        if (!$this->parser) {
            return;
        }

        $node = $this->parser->find('meta[name=keywords]', 0);

        if ($node) {
            return $node->getAttribute('content');
        }
    }
220001
public function categories()
    {
        $resource = '/venues/categories';
        $response = $this->makeApiRequest($resource);

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

        return array();
    }
471880
public function getAll()
    {
        return array_merge(
            [
                'id'       => $this->getUrlParser()->getId(),
                'category' => $this->getUrlParser()->getCategory(),
            ],
            $this->getPictures(),
            $this->getProperties(),
            $this->getDescription()
        );
    }
71493
private function createCategory()
    {
        $pattern = $this->config["category"];

        $index = [];
        $matches = [];
        foreach ($this->meta as $key => $entry) {
            if (preg_match($pattern, $key, $matches)) {
                $catKey = $matches[1];
                $index[$catKey] = $key;
                $this->meta[$key]["key"] = $catKey;
                $this->meta[$key]["url"] = $key;
                unset($this->meta[$key]["__toc__"]);
            }
        }

        return $index;
    }
1274776
public function getMainCategoryAttribute()
    {
        $mainCategory = 'Uncategorized';

        if (! empty($this->terms)) {
            $taxonomies = array_values($this->terms);

            if (! empty($taxonomies[0])) {
                $terms = array_values($taxonomies[0]);
                $mainCategory = $terms[0];
            }
        }

        return $mainCategory;
    }
765917
public function getCategoryMenus()
    {
        if ($this->_categoryMenus === null) {
            $this->setCategoryMenus($this->categoryMenus());
        }
        return $this->_categoryMenus;
    }
356453
public function getKeywordList()
    {
        $data = [static::EXACT_MATCH => [], static::PARTIAL_MATCH => []];

        $replies = $this->__invoke()->select('id, keywords, matchType')->notDeleted()->notReserved()->fetchAll();

        foreach ($replies as $reply) {
            $keywords = explode(' ', $reply['keywords']);
            foreach ($keywords as $keyword) {
                $data[$reply['matchType']][strtolower($keyword)] = $reply['id'];
            }
        }

        return $data;
    }
475672
public function getStepKeywords()
    {
        if (!isset($this->keywordString[$this->language])) {
            $keywords = array_merge(
                explode('|', $this->getGivenKeywords()),
                explode('|', $this->getWhenKeywords()),
                explode('|', $this->getThenKeywords()),
                explode('|', $this->getAndKeywords()),
                explode('|', $this->getButKeywords())
            );

            usort($keywords, function ($keyword1, $keyword2) {
                return mb_strlen($keyword2, 'utf8') - mb_strlen($keyword1, 'utf8');
            });

            $this->keywordString[$this->language] = implode('|', $keywords);
        }

        return $this->keywordString[$this->language];
    }
1354720
protected function getKeywordAsArray($keywords) {
        if (null === $keywords) {
            return array();
        }

        if (is_string($keywords)) {
            return explode(',', $keywords);
        } else {
            $keywords = $keywords->toArray();
            foreach ($keywords as &$keyword) {
                $keyword = $keyword->getId();
            }

            return $keywords;
        }
    }
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;
  }