Applies an action to the selected stores
357949
protected function actionListStore()
    {
        list($selected, $action, $value) = $this->getPostedAction();

        $updated = $deleted = 0;

        foreach ($selected as $id) {

            if ($action === 'status' && $this->access('store_edit')) {
                $updated += (int) $this->store->update($id, array('status' => (int) $value));
            }

            if ($action === 'delete' && $this->access('store_delete') && !$this->store->isDefault($id)) {
                $deleted += (int) $this->store->delete($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');
        }
    }
785580
protected function applyBulk( $model, $column, $action, $target, $config = [] ) {

		switch( $column ) {

			case 'model': {

				switch( $action ) {

					case 'absolute': {

						$model->absolute = true;

						$model->update();

						break;
					}
					case 'delete': {

						$this->delete( $model );

						break;
					}
				}

				break;
			}
		}
	}
442761
protected function applyBulk( $model, $column, $action, $target, $config = [] ) {

		switch( $column ) {

			case 'model': {

				switch( $action ) {

					case 'delete': {

						$this->delete( $model );

						break;
					}
				}

				break;
			}
		}
	}
1142783
protected function actions() {
		// run parent actions ( keep 'admin_head' hook )
		parent::actions();

		if ( empty( $this->struct['page_title'] ) || empty( $this->struct['menu_title'] ) ) {
			return;
		}

		$this->setup_pages();

	}
178747
def select_action(self, **kwargs):
        
        setattr(self.inner_policy, self.attr, self.get_current_value())
        return self.inner_policy.select_action(**kwargs)
1193766
function dispatchToStores(ids = new Set()) {
	ids.forEach((storeID) => {
		if (this[IS_PENDING][storeID]) {
			return true;
		}

		invokeCallback.call(this, storeID);
	});
}
511250
protected function applyBulk( $model, $column, $action, $target, $config = [] ) {

		switch( $column ) {

			case 'model': {

				switch( $action ) {

					case 'sent': {

						$model->sent = true;

						$model->update();

						break;
					}
					case 'delivered': {

						$model->delivered = true;

						$model->update();

						break;
					}
					case 'consumed': {

						$model->consumed = true;

						$model->update();

						break;
					}
					case 'delete': {

						$this->delete( $model );

						break;
					}
				}

				break;
			}
		}
	}
317969
def add_recipe_actions(self, recipe_actions):
        
        for action_name, action in recipe_actions:
            self._recipe_actions[action_name] = action
1067751
def select_army(action, action_space, select_add):
  """"""
  del action_space
  action.action_ui.select_army.selection_add = select_add
789527
public function applySort()
    {
        parent::applySort();

        if ($this->getSortBy() && $this->itemCreate) {
            //Remove previous click handler to Add new Item button and attach new one using sort argument.
            $this->container->js(true, $this->itemCreate->js()->off('click.atk_CRUD'));
            $this->container->js(true,
                                 $this->itemCreate->js()->on('click.atk_CRUD',
                                 new jsFunction([
                                     new jsModal('Add new', $this->pageCreate, [$this->name.'_sort' => $this->getSortBy()]),
                                 ]))
            );
        }
    }
633821
def _apply_param_actions(self, params, schema_params):
        """"""

        for key, val in schema_params.items():
            if key not in params:
                continue

            if isinstance(val, dict):
                self._apply_param_actions(params[key], schema_params[key])
            elif isinstance(val, ResourceId):
                resource_id = val

                # Callers can provide ints as ids.
                # We normalize them to strings so that actions don't get confused.
                params[key] = str(params[key])

                resource_id.action(params, schema_params, key,
                                   resource_id, self.state, self.options)
            else:
                logger.error("Invalid value in schema params: %r. schema_params: %r and params: %r",
                             val, schema_params, params)
130188
def register_custom_actions(parser: argparse.ArgumentParser) -> None:
    """"""
    parser.register('action', None, _StoreRangeAction)
    parser.register('action', 'store', _StoreRangeAction)
    parser.register('action', 'append', _AppendRangeAction)
1317726
function () {
            var self = this;
            base._create.apply(self, arguments);

            if (self.options.actions.listAction) {
                self._adaptListActionforAbp();
            }

            if (self.options.actions.createAction) {
                self._adaptCreateActionforAbp();
            }

            if (self.options.actions.updateAction) {
                self._adaptUpdateActionforAbp();
            }

            if (self.options.actions.deleteAction) {
                self._adaptDeleteActionforAbp();
            }
        }
195884
def select_action(self, next_action_arr, next_q_arr):
        '''
        
        '''
        key_arr = self.select_action_key(next_action_arr, next_q_arr)
        return next_action_arr[key_arr], next_q_arr[key_arr]
1122229
def _doAction(self, action):
		""""""

		if self._db == '':
			raise FMError, 'No database was selected'

		result = ''

		try:
			request = [
				uu({'-db': self._db })
			]

			if self._layout != '':
				request.append(uu({'-lay': self._layout }))

			if action == '-find' and self._lop != 'and':
				request.append(uu({'-lop': self._lop }))

			if action in ['-find', '-findall']:

				if self._skipRecords != 0:
					request.append(uu({ '-skip': self._skipRecords }))

				if self._maxRecords != 0:
					request.append(uu({ '-max': self._maxRecords }))

				for i in range(0, len(self._sortParams)):
					sort = self._sortParams[i]
					request.append(uu({ '-sortfield.'+str(i+1): sort[0] }))

					if sort[1] != '':
						request.append(uu({ '-sortorder.'+str(i+1): sort[1] }))

			for dbParam in self._dbParams:

				if dbParam[0] == 'RECORDID':
					request.append(uu({ '-recid': dbParam[1] }))

				elif dbParam[0] == 'MODID':
					request.append(uu({ '-modid': dbParam[1] }))

				elif hasattr(dbParam[1], 'strftime'):
					d = dbParam[1]
					if (not hasattr(d, 'second')):
						request.append(uu({ dbParam[0]: d.strftime('%m-%d-%Y') }))
					else:
						request.append(uu({ dbParam[0]: d.strftime('%m-%d-%Y %H:%M:%S') }))
					del(d)
				else:
					request.append(uu({ dbParam[0]: dbParam[1] }))
			request.append(action)

			if self._extra_script:
				request += self._extra_script
				self._extra_script = None

			result = self._doRequest(request)

			try:
				result = FMResultset.FMResultset(result)
			except FMFieldError, value:
				realfields = FMServer(self._buildUrl(), self._db, self._layout).doView()

				l = []
				for k, v in self._dbParams:
					if k[-3:] != '.op' and k[0] != '-':
						l.append(("'%s'" % k.replace('::','.')).encode('utf-8'))
				raise FMError, "Field(s) %s not found on layout '%s'" % (', '.join(l), self._layout)

			if action == '-view':
				result = result.fieldNames

		finally:
			self._dbParams = []
			self._sortParams = []
			self._skipRecords = 0
			self._maxRecords = 0
			self._lop = 'and'

		return result
262965
def register_actions(self, shortcut_manager):
        
        shortcut_manager.add_callback_for_action('rename', self.rename_selected_state)
        super(StatesEditorController, self).register_actions(shortcut_manager)
46433
def selected_items
      ((m = marked_items).any? ? m : Array(current_item)).reject {|i| %w(. ..).include? i.name}
    end