Add category

@param \Amulen\ClassificationBundle\Entity\Category $category
@return Strategy
180361
public function addCategory(\Amulen\ClassificationBundle\Entity\Category $category)
    {
        $this->categories[] = $category;

        return $this;
    }
1362903
public function addCategory($category)
    {
        if ($category instanceof FeedItemCategory) {
            $this->categories[] = $category;
        } elseif (is_array($category)) {
            if (!empty($category)) {
                $this->categories[] = FeedItemCategory::createFromArray($category);
            }
        } else {
            throw new \InvalidArgumentException('Invalid category');
        }

        return $this;
    }
146377
private function createDeleteForm(Category $category)
    {
        return $this->createFormBuilder()
            ->setAction($this->generateUrl('ecommerce_category_delete', array('id' => $category->getId())))
            ->setMethod('DELETE')
            ->getForm()
        ;
    }
87340
public function setCategory(\HarvestCloud\CoreBundle\Entity\Category $category)
    {
        $this->category = $category;

        return $this;
    }
605168
public function setVideoCategory($category)
    {
        $this->ensureMediaGroupIsNotNull();
        $this->getMediaGroup()->setCategory(array(new Zend_Gdata_Media_Extension_MediaCategory($category, self::YOUTUBE_CATEGORY_SCHEMA)));
        return $this;
    }
87403
public function addCategoryPath(Shopgate_Model_Catalog_CategoryPath $categoryPath)
    {
        $categoryPaths = $this->getCategoryPaths();
        array_push($categoryPaths, $categoryPath);
        $this->setCategoryPaths($categoryPaths);
    }
176182
public function addCategory(CategoryInterface $category)
    {
        if (!$this
            ->categories
            ->contains($category)
        ) {
            $this
                ->categories
                ->add($category);
        }

        return $this;
    }
1088239
public function inCategory(string $category, string $domain = ''): self
    {
        $this->categories[] = ['category' => $category, 'domain'   => $domain];
        return $this;
    }
1056780
public static function createFromCategory(Category $category): self
    {
        $message = new self();
        $message->setId($category->getId());
        $message->setEnabled($category->isEnabled());

        foreach ($category->getTranslations() as $translation) {
            $transMessage = CategoryTranslationMessage::createFromCategoryTranslation($translation);

            $message->addTranslation($transMessage);
        }

        return $message;
    }
509715
public function setCategory(\Magento\Catalog\Api\Data\CategoryInterface $category)
    {
        $this->category = $category;

        return $this;
    }
1063989
public function addModule(string $category, string $class): self {
        if ($this->isValidModule($category, $class)) {
            $this->modules[$category][] = $class;
        }

        return $this;
    }
539287
public function setCategory($category)
    {
        $properties = $this->getProperty();
        $properties['category'] = (array) $category;
        $this->getConfig()->setSection('bundle', $properties, true);

        return $this;
    }
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')));
    }
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());
    }
650599
public function addSubCategory(CategoryInterface $category)
    {
        if (!$this
            ->subCategories
            ->contains($category)
        ) {
            $this
                ->subCategories
                ->add($category);
        }

        return $this;
    }
710945
public function setCategories($categories)
    {
        foreach ($categories as $category) {
            $category->setBlog($this);
        }
        $this->categories = $categories;

        return $this;
    }