Callback for "category-group-update" command
514827
public function cmdUpdateCategoryGroup()
    {
        $params = $this->getParam();

        if (empty($params[0]) || count($params) < 2) {
            $this->errorAndExit($this->text('Invalid command'));
        }

        if (!is_numeric($params[0])) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        $this->setSubmitted(null, $params);
        $this->setSubmitted('update', $params[0]);
        $this->validateComponent('category_group');

        $this->updateCategoryGroup($params[0]);
        $this->output();
    }
1310421
def update
      @category = Term.find(params[:id])
      @category.deal_with_cover(params[:has_cover_image])
      respond_to do |format|
        # deal with abnormalaties - update the structure url
        if @category.update_attributes(term_params)
          format.html { redirect_to edit_admin_term_path(@category), notice: I18n.t("controllers.admin.terms.update.flash.success", term: Term.get_type_of_term(params)) }
        else
          format.html {
            render action: "edit"
          }
        end

      end
    end
174493
def update_catagory(netid, category_code, status):
    
    url = "{0}/category".format(url_version())
    body = {
        "categoryCode": category_code,
        "status": status,
        "categoryList": [{"netid": netid}]
    }

    response = post_resource(url, json.dumps(body))
    return json.loads(response)
587145
protected function validateCategoryGroup()
    {
        $id = $this->getUpdatingId();

        if ($id === false) {
            return null;
        }

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

        if (empty($data)) {
            $this->setErrorUnavailable('update', $this->translation->text('Category group'));
            return false;
        }

        $this->setUpdating($data);
        return true;
    }
1031905
def update(self, category_id, data, store_view=None):
        
        return bool(
            self.call(
                'catalog_category.update', [category_id, data, store_view]
            )
        )
1361451
public function editCategory($category_group_id, $category_id = null)
    {
        $this->setCategory($category_id);
        $this->setCategoryGroup($category_group_id);
        $this->setTitleEditCategory();
        $this->setBreadcrumbEditCategory();

        $this->setData('category', $this->data_category);
        $this->setData('can_delete', $this->canDeleteCategory());
        $this->setData('category_group', $this->data_category_group);
        $this->setData('parent_id', $this->getQuery('parent_id'));
        $this->setData('categories', $this->getOptionsCategory($category_group_id));
        $this->setData('languages', $this->language->getList(array('enabled' => true)));

        $this->submitEditCategory();

        $this->setDataImagesEditCategory();
        $this->setDataCategoriesEditCategory();
        $this->outputEditCategory();
    }
135117
public function update(CategoriesRequest $request, Category $category)
    {
        $category->update(
            $request->all()
        );

        return redirect()->route('categories.edit', $category)->with(
            'status', trans('globals.success_text')
        );
    }
369132
public function update(DocumentCategory $category)
    {
        $attributes = request()->validate(DocumentCategory::$rules, DocumentCategory::$messages);

        $category = $this->updateEntry($category, $attributes);

        return redirect_to_resource();
    }
280046
public function editCategoryGroup($category_group_id = null)
    {
        $this->setCategoryGroup($category_group_id);
        $this->setTitleEditCategoryGroup();
        $this->setBreadcrumbEditCategoryGroup();

        $this->setData('category_group', $this->data_category_group);
        $this->setData('can_delete', $this->canDeleteCategoryGroup());
        $this->setData('languages', $this->language->getList(array('enabled' => true)));
        $this->setData('category_group_types', $this->category_group->getTypes());

        $this->submitEditCategoryGroup();
        $this->outputEditCategoryGroup();
    }
649960
protected function setDataCategoriesEditCategory()
    {
        $category_id = $this->getData('category.category_id');

        if (isset($category_id)) {

            $category_group_id = $this->getData('category_group.category_group_id');

            $options = array(
                'parent_id' => $category_id,
                'category_group_id' => $category_group_id
            );

            $children = $this->category->getTree($options);

            $exclude = array($category_id);
            foreach ($children as $child) {
                $exclude[] = $child['category_id'];
            }

            $categories = $this->getData('categories');
            $modified = array_diff_key($categories, array_flip($exclude));
            $this->setData('categories', $modified);
        }
    }
956183
public function cmdGetCategoryGroup()
    {
        $result = $this->getListCategoryGroup();
        $this->outputFormat($result);
        $this->outputFormatTableCategoryGroup($result);
        $this->output();
    }
312836
protected function actionListCategory()
    {
        list($selected, $action, $value) = $this->getPostedAction();

        $updated = $deleted = 0;

        foreach ($selected as $category_id) {

            if ($action === 'status' && $this->access('category_edit')) {
                $updated += (int) $this->category->update($category_id, array('status' => $value));
            }

            if ($action === 'delete' && $this->access('category_delete')) {
                $deleted += (int) $this->category->delete($category_id);
            }
        }

        if ($updated > 0) {
            $message = $this->text('Updated %num item(s)', array('%num' => $updated));
            $this->setMessage($message, 'success');
        }

        if ($deleted > 0) {
            $message = $this->text('Deleted %num item(s)', array('%num' => $deleted));
            $this->setMessage($message, 'success');
        }
    }
949675
protected function wizardAddCategoryGroup()
    {
        $this->validatePrompt('title', $this->text('Name'), 'category_group');
        $this->validatePrompt('store_id', $this->text('Store ID'), 'category_group');
        $this->validateMenu('type', $this->text('Type'), 'category_group', $this->category_group->getTypes());

        $this->validateComponent('category_group');
        $this->addCategoryGroup();
    }
528507
def update(self):
        """"""
        if self._is_ignored or "tags" not in self._tag_group_dict:
            return
        for i in range(len(self._tag_group_dict["tags"])):
            tag_dict = self._tag_group_dict["tags"][i]
            for tag in self._tags:
                if tag.name == tag_dict["common.ALLTYPES_NAME"]:
                    self._tag_group_dict["tags"][i] = tag.as_dict()
                    break

        for i in range(len(self._sub_groups)):
            sub_group = self._sub_groups[i]
            sub_group.update()
            self._tag_group_dict["tag_groups"][i] = sub_group.as_dict()
315349
protected function setCategoryGroup($category_group_id)
    {
        $this->data_category_group = array();

        if (is_numeric($category_group_id)) {

            $conditions = array(
                'language' => 'und',
                'category_group_id' => $category_group_id
            );

            $this->data_category_group = $this->category_group->get($conditions);

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

            $this->prepareCategoryGroup($this->data_category_group);
        }
    }
838675
function callbackGroupStatusChange(?\CharlotteDunois\Yasmin\Models\Guild $guild, \CharlotteDunois\Livia\Commands\CommandGroup $group, bool $enabled) {
        if(!empty($this->setup[$this->getGuildID($guild)])) {
            return;
        }
        
        $this->set($guild, 'group-'.$group->id, $enabled);
    }
623253
def p_group_command(p):
    ''''''
    lcurly = ast.node(kind='reservedword', word=p[1], pos=p.lexspan(1))
    rcurly = ast.node(kind='reservedword', word=p[3], pos=p.lexspan(3))
    parts = [lcurly, p[2], rcurly]
    p[0] = ast.node(kind='compound', list=parts, redirects=[],
                    pos=_partsspan(parts))