Updates a category
@param string $category_id
351490
protected function updateCategory($category_id)
    {
        if (!$this->isError() && !$this->category->update($category_id, $this->getSubmitted())) {
            $this->errorAndExit($this->text('Unexpected result'));
        }
    }
1004442
protected function addCategoryGroup()
    {
        if (!$this->isError()) {
            $id = $this->category_group->add($this->getSubmitted());
            if (empty($id)) {
                $this->errorAndExit($this->text('Unexpected result'));
            }
            $this->line($id);
        }
    }
990520
public function update($module_id, array $data)
    {
        $data['modified'] = GC_TIME;
        $this->db->update('module', $data, array('module_id' => $module_id));
    }
217908
protected function updateCategoryGroup()
    {
        $this->controlAccess('category_group_edit');

        if ($this->category_group->update($this->data_category_group['category_group_id'], $this->getSubmitted())) {
            $this->redirect('admin/content/category-group', $this->text('Category group has been updated'), 'success');
        }

        $this->redirect('', $this->text('Category group has not been updated'), 'warning');
    }
89630
public function update(Request $request)
    {
        $this->cache->tags('categories')->flush();

        $this->categoryOrdener->handle($request->get('categories'));
    }
990983
public function category(Category $category)
    {
        $this->category = $category;

        $this->category->categorise($this);
    }
195184
private function SaveCategoryPage($categoryID)
    {
        $category = Category::Schema()->ByID($categoryID);
        if ($category) {
            $category->SetPage($this->Page());
            $category->Save();
        }
    }
149553
public function updateCategory($path, $category)
    {
        $this->categories[$path] = array_merge($this->categories[$path], $category);
    }
310362
public function edit(CategoryRequest $request, Category $category)
    {
        return $this->response->title(trans('app.edit') . ' ' . trans('faq::category.name'))
            ->view('faq::category.edit', true)
            ->data(compact('category'))
            ->output();
    }
407923
protected function reindexUpdatedCategories($categoryId)
    {
        /** @var $category \Magento\Catalog\Model\Category */
        $category = $this->defaultCategory->load($categoryId);
        //$categoryName = $category->getName();
        foreach ($category->getStoreIds() as $storeId) {
            if ($storeId == 0) {
                continue;
            }

            $category = $this->categoryRepository->get($categoryId, $storeId);

            $urlRewrites = $this->categoryUrlRewriteGenerator->generate($category, true);
            $this->urlPersist->replace($urlRewrites);
        }
        return $this;
    }
806716
def updateproduct(self, category_id, product, position=None):
        
        return bool(self.call(
            'catalog_category.updateProduct', [category_id, product, position])
        )
946032
static function updateCategory($category)
    {
        // Update the category thread and post counts
        $threads = $category->threads()->where('deleted_at', null)->get();
        $category->thread_count = $threads->count();

        $postCount = 0;
        foreach ($threads as $thread) {
            $postCount += $thread->posts->count();
        }

        $category->post_count = $postCount;
        $category->saveWithoutTouch();
    }
623470
def tag_update(self, tag_id, category):
        
        param = {'tag[category]': category}
        return self._get('pools/{0}.json'.format(tag_id), param, method='PUT',
                         auth=True)
478665
public function seedCategory($category_id = 0)
    {
        $categories = $this->blender->getCategoryMap();
        if (isset($categories['ids'][$category_id]) && isset($categories['ids'][$category_id]['lineage'])) {
            return $categories['ids'][$category_id]['lineage'];
        }

        return '';
    }
556406
public function addCategory($category)
    {
        if ( ! in_array($category, (array)$this->categories)) {
            $this->categories[] = $category;
        }

        return $this;
    }
1372042
public function handleEdit(int $id)
    {
        if ($this->presenter->isAjax())
        {
            $this->categoryId = $id;
            $this->onOpen();
        }
    }
1068308
public function update(Category $category, array $data)
    {
        if (Session::has('multi_language_enabled')) {
            $languageId = $data['language_id'];
            $languaModel = Language::find($languageId);
            
            if ($languaModel->is_default) {
                return $category->update($data);
            } else {
                $category->update(Arr::only($data, ['parent_id']));

                $translatedModel = $category
                    ->translations()
                    ->whereLanguageId($languageId)
                    ->first();
                if (null === $translatedModel) {
                    return CategoryTranslation::create(
                        array_merge($data, ['category_id' => $category->id])
                    );
                } else {
                    $translatedModel->update(
                        $data,
                        $category->getTranslatedAttributes()
                    );

                    return $translatedModel;
                }

            }
        } else {
            return $category->update($data);
        }
    }