Load category data to the template.

@param ICategory $category
559057
public function load(ICategory $category)
    {
        $this->template->set('title', $category->getTitle());
        $this->template->set('meta_title', $category->metaTitle());
        $this->template->set('meta_keywords', $category->metaKeywords());
        $this->template->set('meta_description', $category->metaDescription());
    }
700546
private function loadCategory()
    {
        $category   = $this->categoryFactory->create();
        $storeId    = $this->getRequest()->getParam('store');
        $categoryId = $this->getRequest()->getParam('entity_id');

        $category->setStoreId($storeId)->load($categoryId);

        return $category;
    }
465107
public function load_item_category() {
        if (empty($this->item_category->id)) {
            $this->item_category = $this->get_item_category();
        }
        return $this->item_category;
    }
310389
protected function setCategory($category_id)
    {
        $this->data_category = array();

        if (is_numeric($category_id)) {

            //Set unexisting language code to get original titles.
            //Otherwise it will be translated to the current language
            $conditions = array(
                'language' => 'und',
                'category_id' => $category_id
            );

            $this->data_category = $this->category->get($conditions);

            if (empty($this->data_category)) {
                $this->outputHttpStatus(404);
            }

            $this->prepareCategory($this->data_category);
        }
    }
928615
public function setCategory(\Lyon1\Bundle\PoobleBundle\Entity\SurveyCategory $category = null)
    {
        $this->category = $category;

        return $this;
    }
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;
    }
971918
public function addCategory($category)
	{
		if (!is_string($category))
		{
			// @codeCoverageIgnoreStart
			throw new \LogicException('Category must be of a type "string"');
			// @codeCoverageIgnoreEnd
		}
		$this->categories[$category] = $category;

		return $this;
	}
1140395
public function setCategory(\Amulen\ClassificationBundle\Entity\Category $category = null)
    {
        $this->category = $category;

        return $this;
    }
1225907
public function setCategory($category, $preserveDefault = false, $includeSubcategories = false)
    {
        /** @var Model $model */
        $model = $this->framework->getAdapter(Model::class);

        // Include the subcategories
        if ($includeSubcategories) {
            /** @var NewsCategoryModel $newsCategoryModel */
            $newsCategoryModel = $this->framework->getAdapter(NewsCategoryModel::class);
            $category = $newsCategoryModel->getAllSubcategoriesIds($category);
        }

        $newsIds = $model->getReferenceValues('tl_news', 'categories', $category);
        $newsIds = $this->parseIds($newsIds);

        if (0 === \count($newsIds)) {
            throw new NoNewsException();
        }

        // Do not preserve the default categories
        if (!$preserveDefault) {
            unset($this->columns['defaultCategories']);
        }

        $t = $this->getNewsModelAdapter()->getTable();

        $this->columns[] = "$t.id IN(".\implode(',', $newsIds).')';
    }
1241549
public function add($category)
    {
        if (is_array($category)) {
            $this->collection[] = new Category($category);
        } elseif (is_object($category) && $category instanceof Category) {
            $this->collection[] = $category;
        }

        return $this;
    }
658853
public function addParentCategory(CategoryInterface $category): CategoryInterface
    {
        if (!$this->hasParentCategory($category)) {
            $this->parentCategories->add($category);
        }

        return $this;
    }
1078874
protected function _ppLoadFullCategory($sId)
    {
        if (isset($this->_aArray[$sId])) {
            $oNewCat = oxNew(\OxidEsales\Eshop\Application\Model\Category::class);
            if ($oNewCat->load($sId)) {
                // replace aArray object with fully loaded category
                $this->_aArray[$sId] = $oNewCat;
            }
        } else {
            $this->_sActCat = null;
        }
    }
994662
public function setCategories($categories)
    {
        foreach ($categories as $key => $name) {
            $this->_categories[$key] = $name;
        }
    }
769743
public function serialize(Category $category)
    {
        return [
            'id' => $category->getId(),
            'name' => $category->getName(),
            'order' => $category->getOrder(),
            'user' => $this->userSerializer->serialize($category->getUser()),
        ];
    }
903189
public function addCategory(\Hexmedia\ContentBundle\Entity\Category $category)
    {
        $this->categories[] = $category;

        return $this;
    }
624705
public function make(ICategory $category)
    {
        //$category->setResponse($this->response->view('admin.categorys.view', compact('category')));
        $category->setResponse($this->response->view(\OogleeBConfig::get('config.category_view.view'), compact('category')));
    }
1132527
protected function ensure_category_loaded() {
        if (is_array($this->_categories)) {
            return; // Already done.
        }
        if (is_null($this->_course)) {
            throw new coding_exception('Attempt to get the course category for this page before the course was set.');
        }
        if ($this->_course->category == 0) {
            $this->_categories = array();
        } else {
            $this->load_category($this->_course->category);
        }
    }