Returns the grade_category for a grade category grade item

@return grade_category|bool Returns a grade_category instance if applicable or false otherwise
541572
public function get_item_category() {
        if (!$this->is_course_item() and !$this->is_category_item()) {
            return false;
        }
        return grade_category::fetch(array('id'=>$this->iteminstance));
    }
182001
public function getRootCategories ()
    {
        return self::where('parent' , 0)
            ->where('slug' , '<>' , config('Categories::category.default_category.slug'))
            ->orderby('id' , 'desc')
            ->where('model_type' , $this->modelType)
            ->get();
    }
588097
public function root()
    {
        $category = $this->createModel();

        $category = $category->whereExists(function($query)
        {
            $query->select(\DB::raw(1))
                  ->from('category_hierarchy')
                  ->whereRaw(DB::getTablePrefix().'categories.id = '.DB::getTablePrefix().'category_hierarchy.category_id')
                  ->where('category_hierarchy.category_parent_id', 0);
        });

        return $category;
    }
1274535
public function getActCategory()
    {
        $oCat = oxNew(\OxidEsales\Eshop\Application\Model\Category::class);

        return ($oCat->load($this->getActCatId())) ? $oCat : null;
    }
770050
protected function getCategoryUrl()
    {
        $rootKey = $this->container->getParameter('sulu_product.category_root_key');

        if (null !== $rootKey) {
            return $this->generateUrl(
                'get_category_children',
                ['key' => $rootKey, 'flat' => 'true', 'sortBy' => 'depth', 'sortOrder' => 'asc']
            );
        }

        return $this->generateUrl(
            'get_categories',
            ['flat' => 'true', 'sortBy' => 'depth', 'sortOrder' => 'asc']
        );
    }
1327852
public function getCmsCategories()
    {
        $categories = array('' => 'No category');

        $results = $this->getEventManager()
            ->trigger(__FUNCTION__, $this, array(
            'categories' => $categories
            ))
            ->last();

        if ($results) {
            $categories = $results;
        }

        return $categories;
    }
1028665
public function getCategory($category)
    {
        $ds = DIRECTORY_SEPARATOR;
        $categoryPath = str_replace('/', $ds, $category);

        $path = app_path().$ds.'lablog'.$ds.$categoryPath;

        if (!$this->exists($category)) {
            return (object) array();
        }

        $categoryExplode = explode('/', $category);
        $categoryName = end($categoryExplode);

        $linkPrefix = \Config::get('lablog::prefix') == '/' ? '' : \Config::get('lablog::prefix');

        $baseCategory = $category;
        $categoryLink = $linkPrefix.'/category/'.$category;
        $fullCategory = $category;

        $category = new Category;
        $category->name = $categoryName;
        $category->link = $baseCategory;
        $category->url = \URL::to($categoryLink);

        return $category;
    }
434433
public function get_grade_item() {
        if ($this->gradeitem) {
            return $this->gradeitem;
        }
        $instance = $this->get_instance();
        $params = array('itemtype' => 'mod',
                        'itemmodule' => 'assign',
                        'iteminstance' => $instance->id,
                        'courseid' => $instance->course,
                        'itemnumber' => 0);
        $this->gradeitem = grade_item::fetch($params);
        if (!$this->gradeitem) {
            throw new coding_exception('Improper use of the assignment class. ' .
                                       'Cannot load the grade item.');
        }
        return $this->gradeitem;
    }
33065
private function getCategory()
    {
        $category = $this->loadCategory();

        $this->addVirtualCategoryData($category)
            ->addSelectedProducts($category)
            ->setSortedProducts($category);

        return $category;
    }
643935
public function getVatClasses()
    {
        $result = array();
        /** @var \hikashopCategoryClass $categoryClass */
        $categoryClass = hikashop_get('class.category');
        /** @var \stdClass $category */
        $category = $categoryClass->get('tax');
        $taxClasses = $categoryClass->getChildren((int) $category->category_id, true, array(), '', 0, 0);
        foreach ($taxClasses as $taxClass) {
            /** @var \stdClass $category */
            $result[$taxClass->category_namekey] = $taxClass->category_name;
        }
        return $result;
    }
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;
    }
640007
public function get_gradinginstance() {
        if (is_array($this->gradingattributes) && array_key_exists('gradinginstance', $this->gradingattributes)) {
            return $this->gradingattributes['gradinginstance'];
        } else {
            return null;
        }
    }
26463
protected function getListCategoryGroup()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            return $this->category_group->getList(array('limit' => $this->getLimit()));
        }

        if ($this->getParam('type')) {
            return $this->category_group->getList(array('type' => $id, 'limit' => $this->getLimit()));
        }

        if (!is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        if ($this->getParam('store')) {
            return $this->category_group->getList(array('store_id' => $id, 'limit' => $this->getLimit()));
        }

        $result = $this->category_group->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }
795008
public function getChildrenAttribute()
    {
        $children = $this->categories;

        $children = $children->filter(function ($category) {
            if ($category->private) {
                return Gate::allows('view', $category);
            }

            return true;
        });

        return $children;
    }
104437
public function getParentCategory()
    {
        $parentCategory = null;
        $currentCategory = $this->getCurrentCategory();
        if (null !== $currentCategory) {
            $parentCategoryId = $currentCategory->getParentId();
            $parentCategory = $this->_categoryRepository->get(
                $parentCategoryId,
                $this->_storeManager->getStore()->getId()
            );
            if (null !== $parentCategory && 1 >= $parentCategory->getLevel()) {
                $parentCategory = null;
            }
        }
        return $parentCategory;
    }
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;
    }
1365787
public function get_categories() {
        $data = $this->data;

        if (empty($data[Parser::INDEX_PARENT_SPEC])) {
            return array();
        }

        // Okay. We first grab all of our categories.
        $categories = array();
        foreach ($data[Parser::INDEX_PARENT_SPEC] as $category) {
            $categories[] = $this->api->get_category($category['value']);
        }

        return $categories;
    }