Add visitAction.

@param \BlackForest\PiwikBundle\Entity\PiwikVisitAction $visitAction

@return PiwikVisit
191222
public function addVisitAction(\BlackForest\PiwikBundle\Entity\PiwikVisitAction $visitAction)
    {
        $this->visitAction[] = $visitAction;

        return $this;
    }
110431
public function onVisitNode(VisitNodeEvent $event)
    {
        if ($this->isOurNode($event->getNode())) {
            return $event;
        }

        $this->node = $event->getNode();
        $this->builder = $event->getBuilder();
        $this->className = $event->getClassName();

        if ($this->node instanceof AbstractScalarOperatorNode && $this->isTranslatableFieldNode()) {
            $alteredNode = $this->getAlteredQueryNode(
                $this->getDocumentFieldName(),
                $this->getAllPossibleTranslatableStrings()
            );

            if (!empty($alteredNode->getQueries())) {
                $event->setNode($alteredNode);
            }
        }

        return $event;
    }
298433
public function addMbAction($actionName, $action = null)
    {
        $mbAction = new MbAction($this, $actionName);
        $mbAction->actionResolver($action);

        return $this->setMbAction($mbAction);
    }
899615
protected function recordStandardGoals(VisitProperties $visitProperties, Request $request, $goal, $action)
    {
        $visitor = Visitor::makeFromVisitProperties($visitProperties, $request);

        $convertedGoals = $request->getMetadata('Goals', 'goalsConverted') ?: array();
        foreach ($convertedGoals as $convertedGoal) {
            $this->currentGoal = $convertedGoal;
            Common::printDebug("- Goal " . $convertedGoal['idgoal'] . " matched. Recording...");
            $conversion = $goal;
            $conversion['idgoal'] = $convertedGoal['idgoal'];
            $conversion['url']    = $convertedGoal['url'];

            if (!is_null($action)) {
                $conversion['idaction_url'] = $action->getIdActionUrl();
                $conversion['idlink_va'] = $action->getIdLinkVisitAction();
            }

            // If multiple Goal conversions per visit, set a cache buster
            if ($convertedGoal['allow_multiple'] == 0) {
                $conversion['buster'] = 0;
            } else {
                $lastActionTime = $visitProperties->getProperty('visit_last_action_time');
                if (empty($lastActionTime)) {
                    $conversion['buster'] = $this->makeRandomMySqlUnsignedInt(10);
                } else {
                    $conversion['buster'] = $this->makeRandomMySqlUnsignedInt(2) . Common::mb_substr($visitProperties->getProperty('visit_last_action_time'), 2);
                }
            }

            $conversionDimensions = ConversionDimension::getAllDimensions();
            $conversion = $this->triggerHookOnDimensions($request, $conversionDimensions, 'onGoalConversion', $visitor, $action, $conversion);

            $this->insertNewConversion($conversion, $visitProperties->getProperties(), $request, $action, $convertedGoal);
        }
    }
1144471
public function addRoute($methods, $uri, $action)
    {
        if (is_string($action)) {
            $action = ['uses' => $action];
        } elseif ($action instanceof Closure) {
            $action = [$action];
        }

        $action = $this->mergeLastGroupAttributes($action);

        $uri = $uri === '/' ? $uri : '/'.trim($uri, '/');

        if (! empty($action['prefix'])) {
            $uri = '/'.rtrim(trim($action['prefix'], '/').'/'.trim($uri, '/'), '/');

            unset($action['prefix']);
        }

        $action['uri'] = $uri;

        $action = $this->addRouteMiddlewares($action);

//        echo $action;
//        return $this->adapter->addRoute((array) $methods, $action['version'], $uri, $action);
        return $this->addRoute((array) $methods, $action['version'], $uri, $action);
    }
714235
public function addAction($action)
    {
        if (! is_array($action) && ! $action instanceof AttachmentAction) {
            throw ActionCannotBeAdded::invalidType();
        }

        if (is_array($action)) {
            $name = $action['name'];
            $text = $action['text'];
            $type = $action['type'];

            $action = AttachmentAction::create($name, $text, $type);
        }

        $this->actions->push($action);

        return $this;
    }
583451
public function onVisitNode(VisitNodeEvent $event)
    {
        $node = $event->getNode();
        if ($node instanceof AbstractScalarOperatorNode &&
            $this->isExtrefField($node->getField(), $event->getContext())) {
            $event->setNode($this->processScalarNode($node));
        } elseif ($node instanceof AbstractArrayOperatorNode &&
            $this->isExtrefField($node->getField(), $event->getContext())) {
            $event->setNode($this->processArrayNode($node));
        }

        return $event;
    }
926909
public function execute($action) {
        admin_externalpage_setup('tool_usertours/tours');
        // Add the main content.
        switch($action) {
            case self::ACTION_NEWTOUR:
            case self::ACTION_EDITTOUR:
                $this->edit_tour(optional_param('id', null, PARAM_INT));
                break;

            case self::ACTION_MOVETOUR:
                $this->move_tour(required_param('id', PARAM_INT));
                break;

            case self::ACTION_EXPORTTOUR:
                $this->export_tour(required_param('id', PARAM_INT));
                break;

            case self::ACTION_IMPORTTOUR:
                $this->import_tour();
                break;

            case self::ACTION_VIEWTOUR:
                $this->view_tour(required_param('id', PARAM_INT));
                break;

            case self::ACTION_HIDETOUR:
                $this->hide_tour(required_param('id', PARAM_INT));
                break;

            case self::ACTION_SHOWTOUR:
                $this->show_tour(required_param('id', PARAM_INT));
                break;

            case self::ACTION_DELETETOUR:
                $this->delete_tour(required_param('id', PARAM_INT));
                break;

            case self::ACTION_RESETFORALL:
                $this->reset_tour_for_all(required_param('id', PARAM_INT));
                break;

            case self::ACTION_NEWSTEP:
            case self::ACTION_EDITSTEP:
                $this->edit_step(optional_param('id', null, PARAM_INT));
                break;

            case self::ACTION_MOVESTEP:
                $this->move_step(required_param('id', PARAM_INT));
                break;

            case self::ACTION_DELETESTEP:
                $this->delete_step(required_param('id', PARAM_INT));
                break;

            case self::ACTION_LISTTOURS:
            default:
                $this->print_tour_list();
                break;
        }
    }
903477
public function addLocation(\BlackForest\PiwikBundle\Entity\PiwikLocation $location)
    {
        $this->location[] = $location;

        return $this;
    }
685763
public function setLogActionDetail(\BlackForest\PiwikBundle\Entity\PiwikLogAction $logActionDetail = null)
    {
        $this->logActionDetail = $logActionDetail;

        return $this;
    }
707604
@Override
    public R visitDocComment(DocCommentTree node, P p) {
        return defaultAction(node, p);
    }
75014
public function setAction(\BlackForest\PiwikBundle\Entity\PiwikAction $action = null)
    {
        $this->action = $action;

        return $this;
    }
1211720
public function add($uri, $method, $controller, $action) {
        $this->currentRoute = [
            'uri' => $uri,
            'method' => $method,
            'controller' => $controller,
            'action' => $action,
            'module' => $this->module,
        ];

        if ($this->currentGroupName) {
            $this->virtualRoutes[$this->currentGroupName][] = $this->currentRoute;
        } else {
            $this->virtualRoutes['*'][] = $this->currentRoute;
        }

        return $this;
    }
65746
@Override
    public R visitSince(SinceTree node, P p) {
        return defaultAction(node, p);
    }
440920
public function addAction(Action $action): Editbox
    {

        switch ($action->getType()) {
            case Action::SAVE:
                $this->actions[0] = $action;
                break;

            case Action::CANCEL:
                $this->actions[1] = $action;
                break;

            case Action::CONTEXT:
            default:
                if (empty($this->actions[2])) {
                    $this->actions[2] = [];
                }

                $this->actions[2][] = $action;

                break;

        }

        return $this;
    }
344953
public function appendAction(FrenchFrogs\Form\Element\Button $action)
    {
        $this->actions[] = $action;
        return $this;
    }
458439
public function addActionType(\BlackForest\PiwikBundle\Entity\PiwikActionType $actionType)
    {
        $this->actionType[] = $actionType;

        return $this;
    }