All double tag actions are routed through this method,
to wrap the request in the required format for the
pocket API.

Valid actions are: tags_add, tags_remove, tags_replace

@param  array $tag_info
@param  string $action
182683
public function tags_queue($tag_info = array(), $action = null)
    {

        if( ! isset($tag_info['item_id']) ) {
            throw new NoItemException("No item id was sent");
        } else if ( ! is_numeric($tag_info['item_id']) ){
            throw new InvalidItemTypeException("The item id: {$tag_info['item_id']} is not valid it should be a number");
        }

        if( sizeof($tag_info['tags']) == 0 ) {
            throw new NoItemException("No tags received");
        }
        
        $base_info  = array(
            'action'        => $action,
            'time'          => time()
        );

        $tag_info = array_merge($base_info, $tag_info);

        $this->actions[] = $tag_info;

        return true;

    }
534881
public function beforeAction($action)
    {
        Yii::$app->response->format = Response::FORMAT_HTML;
        return parent::beforeAction($action);
    }
289070
public void add(final AtomicAction action) {
        if (action instanceof Action) {
            Action a = (Action)action;
            peforms.addAll(a.peforms);
            backouts.addAll(a.backouts);
            cleanUps.addAll(a.cleanUps);
        } else {
            add(new ActionBlock() {
                @Override
                public void execute() throws ActionException {
                    action.perform();
                }
            }, new ActionBlock() {
                @Override
                public void execute() throws ActionException {
                    action.backout();
                }
            }, new ActionBlock() {
                @Override
                public void execute() throws ActionException {
                    action.cleanup();
                }
            });
        }
    }
589512
protected function preEditChecks( $action = "Edit" ) {
	    $this->wiki->preEditChecks( $action, $this->title, $this->pageid );
	}
517270
public static function add($tag, $behavior, $first = false)
    {
        if (!isset(self::$tags[$tag])) {
            self::$tags[$tag] = [];
        }

        if ($first) {
            array_unshift(self::$tags[$tag], $behavior);
        } else {
            self::$tags[$tag][] = $behavior;
        }
    }
427499
public function basic_ack($delivery_tag, $multiple = false)
    {
        list($class_id, $method_id, $args) = $this->protocolWriter->basicAck($delivery_tag, $multiple);
        $this->send_method_frame(array($class_id, $method_id), $args);
    }
641829
def remove_tag(tag_id):
        '''
        
        '''
        entry = TabPost2Tag.delete().where(
            TabPost2Tag.tag_id == tag_id
        )
        entry.execute()
1031448
public function tagAction($tag, Request $request = null)
    {
        $action = $this->container->get(TagPostArchiveAction::class);

        return $action($this->resolveRequest($request), $tag);
    }
1129513
public static function add(Tag &$Tag)
    {
        if (Config::get('store') == 'global') {
            self::$_tagStore[$Tag->ID] = &$Tag;
        } elseif (Config::get('store') == 'internal') {
            Config::getHTMLInstance()->tagStore[$Tag->ID] = &$Tag;
        }
    }
513127
public function tagAssetAction(Asset $asset, Tag $tag): void
    {
        $success = false;
        if ($asset->addTag($tag)) {
            $this->assetRepository->update($asset);
            $success = true;
        }
        $this->view->assign('value', $success);
    }
996408
public function setLinkExtractionTags($tag_array)
  {
    if (!is_array($tag_array)) return false;
    
    $this->LinkFinder->extract_tags = $tag_array;
    return true;
  }
592858
def do(action)
      raise ArgumentError, "Parameter, 'action', expected to be a #{Action}, but received: #{action}" unless action.is_a? Action

      # Remove all undone actions when a new one is performed.
      if can_redo?
        if @last_done == -1
          @actions.clear
        else
          @actions = @actions[0..@last_done]
        end
      end

      # If history is too big, remove the oldest action.
      if @actions.size >= @max_size
        @actions.shift
      end

      @last_done = @actions.size
      @actions << action
      action.do

      nil
    end
451156
public static function addDoubleAttributes(Tag &$Tag)
    {
        if (isset(TagInfo::$doubleAttrs[$Tag->name])) {
            $missing = array();
            $found = '';
            foreach (TagInfo::$doubleAttrs[$Tag->name] as $k => $name) {
                if ($k === '%callback') {
                    $callback = $name;
                    continue;
                }
                if (isset($Tag->attributes[$name])) {
                    $found = $Tag->attributes[$name];
                } else {
                    $missing[] = $name;
                }
            }
            if (empty($found) || empty($missing)) {
                return;
            }
            foreach ($missing as $k) {
                $Tag->attributes[$k] = $found;
            }

            if (count($missing) && isset($callback) && is_callable($callback)) {
                call_user_func_array($callback, array(&$Tag, $missing));
            }
        }
    }
626641
public void updateAction(Action action)
	{
		action.putValue(Action.NAME, myMessageProvider.getMessage(getLabelMessage(), getLocale()));
		action.putValue(Action.SHORT_DESCRIPTION, myMessageProvider.getMessage(getLabelDescription(), getLocale()));
		if (IS_NOT_EMPTY.test(getKeyboardShortcut()))
		{
			action.putValue(Action.ACCELERATOR_KEY, KeyboardRepresentationTable.getKeyStroke(getKeyboardShortcut()));
		}
		else
		{
			action.putValue(Action.ACCELERATOR_KEY, null);
		}
	}
829854
public function addTag(Tag $tag)
    {
        if (!$this->tags->contains($tag)) {
            $this->tags->add($tag);
            return true;
        }
        return false;
    }
551439
public function addAction($action)
    {
        if ($action instanceof Action) {
            $action = $action->getName();
        }
        $this->actionList[] = $action;
        $this->valid = null;

        return $this;
    }
377299
public function addAction($controller, $action = null)
    {
        if ($action === null) {
            list($controller, $action) = explode('.', $controller);
        }
        $this->actions[] = array(
            'controller' => null,
            'controller_name' => $controller,
            'action' => $action,
            'result' => null,
        );
        $this->action_names[] = "{$controller}.{$action}";
    }