Add the following actions to the report:
following pages, downloads, outlinks

@param LogAggregator $logAggregator
@param $report
@param $idaction
@param string $actionType
@param $limitBeforeGrouping
@param boolean $includeLoops
340421
private function addFollowingActions($logAggregator, &$report, $idaction, $actionType, $limitBeforeGrouping, $includeLoops = false)
    {
        $data = $this->queryFollowingActions(
            $idaction, $actionType, $logAggregator, $limitBeforeGrouping, $includeLoops);

        foreach ($data as $tableName => $table) {
            $report[$tableName] = $table;
        }
    }
327161
public function run(JobReport $report)
    {
        $this->report = $report;
        $report->setStartTime(microtime(true));
        $this->getProcess()->start(function ($type, $buffer) use ($report) {
            if (Process::ERR === $type) {
                $report->addError($buffer);
            } else {
                $report->addOutput($buffer);
            }
        });
    }
329462
private static function setCachedActionRow($idAction, $actionType, $actionRow)
    {
        $cacheLabel = self::getCachedActionRowKey($idAction, $actionType);
        self::$cacheParsedAction[$cacheLabel] = $actionRow;
    }
1251928
private void addLogicalStep(LogicalStep lStep) throws ExecutionException {
        if (lStep instanceof Project) {
            project = (Project) lStep;

        } else if (lStep instanceof Filter) {
            decideTypeFilterToAdd((Filter) lStep);

        } else if (lStep instanceof FunctionFilter){
            functionFilters.add((FunctionFilter) lStep);

        }else if (lStep instanceof Select) {
            select = (Select) lStep;

        } else if (lStep instanceof Limit) {
            limit = (Limit) lStep;

        } else if (lStep instanceof GroupBy) {
            groupBy = (GroupBy) lStep;

        } else if (lStep instanceof Window) {
            window = (Window) lStep;

        } else if (lStep instanceof OrderBy) {
            orderBy = (OrderBy) lStep;
        }else if (lStep instanceof Disjunction){
            switchDisjunctionList((Disjunction) lStep);
        } else {

            String message = "LogicalStep [" + lStep.getClass().getCanonicalName() + " not supported";
            logger.error(message);
            throw new ExecutionException(message);
        }
    }
1212973
private function updateCacheBuster(common_report_Report $report, $updateid)
    {
        try {
            $assetService = $this->getServiceLocator()->get(AssetService::SERVICE_ID);
            $assetService->setCacheBuster($updateid);
            $this->getServiceLocator()->register(AssetService::SERVICE_ID, $assetService);
        } catch (\Exception $e) {
            \common_Logger::e($e->getMessage());
            $report->add(new common_report_Report(common_report_Report::TYPE_WARNING,__('Unable to update the asset service')));
        }
    }
276800
@Override
	public void setAggregator(IAggregator aggregator) {
		if (this.aggregator != null) {
			throw new IllegalStateException();
		}
		this.aggregator = aggregator;

		// See if the max cache entries init-param has changed and
		int newMaxCapacity = getMaxCapacity(aggregator);

		// If the maximum size has changed, then create a new layerBuildMap with the new
		// max size and copy the entries from the existing map to the new map
		ConcurrentLinkedHashMap<String, CacheEntry> oldLayerBuildMap = null;
		// have no layer builds in the layerBuildMap
		if (maxCapacity != newMaxCapacity) {
			maxCapacity = newMaxCapacity;
			oldLayerBuildMap = layerBuildMap;
			layerBuildMap = new ConcurrentLinkedHashMap.Builder<String, CacheEntry>()
					.maximumWeightedCapacity(maxCapacity)
					.listener(newEvictionListener())
					.weigher(newWeigher())
					.build();
			// Need to call setLayerBuildAccessors BEFORE calling putAll because
			// it might result in the eviction handler being called.
			setLayerBuildAccessors(oldLayerBuildMap.keySet());
			layerBuildMap.putAll(oldLayerBuildMap.ascendingMap());
			oldLayerBuildMap.clear();
		} else {
			setLayerBuildAccessors(layerBuildMap.keySet());
		}
	}
690994
public function syncCollection($uri, SyncCollectionReport $report)
    {
        // Getting the data
        $node = $this->server->tree->getNodeForPath($uri);
        if (!$node instanceof ISyncCollection) {
            throw new DAV\Exception\ReportNotSupported('The {DAV:}sync-collection REPORT is not supported on this url.');
        }
        $token = $node->getSyncToken();
        if (!$token) {
            throw new DAV\Exception\ReportNotSupported('No sync information is available at this node');
        }

        $syncToken = $report->syncToken;
        if (!is_null($syncToken)) {
            // Sync-token must start with our prefix
            if (self::SYNCTOKEN_PREFIX !== substr($syncToken, 0, strlen(self::SYNCTOKEN_PREFIX))) {
                throw new DAV\Exception\InvalidSyncToken('Invalid or unknown sync token');
            }

            $syncToken = substr($syncToken, strlen(self::SYNCTOKEN_PREFIX));
        }
        $changeInfo = $node->getChanges($syncToken, $report->syncLevel, $report->limit);

        if (is_null($changeInfo)) {
            throw new DAV\Exception\InvalidSyncToken('Invalid or unknown sync token');
        }

        // Encoding the response
        $this->sendSyncCollectionResponse(
            $changeInfo['syncToken'],
            $uri,
            $changeInfo['added'],
            $changeInfo['modified'],
            $changeInfo['deleted'],
            $report->properties
        );
    }
415722
protected final void setReportFormGroups(final F report) {
        if (!report.getGroups().isEmpty()) {
            return;
        }

        final Set<AggregatedGroupMapping> groups = this.getGroups();
        if (!groups.isEmpty()) {
            report.getGroups().add(groups.iterator().next().getId());
        }
    }
491137
public void appendReport (StringBuilder report, long now, long sinceLast, boolean reset)
    {
        PresentsConMgrStats stats = getStats();
        long eventCount = stats.eventCount - _lastStats.eventCount;
        int connects = stats.connects - _lastStats.connects;
        int disconnects = stats.disconnects - _lastStats.disconnects;
        int closes = stats.closes - _lastStats.closes;
        long bytesIn = stats.bytesIn - _lastStats.bytesIn;
        long bytesOut = stats.bytesOut - _lastStats.bytesOut;
        long msgsIn = stats.msgsIn - _lastStats.msgsIn;
        long msgsOut = stats.msgsOut - _lastStats.msgsOut;
        if (reset) {
            _lastStats = stats;
        }

        // make sure we don't div0 if this method somehow gets called twice in
        // the same millisecond
        sinceLast = Math.max(sinceLast, 1L);

        report.append("* presents.net.ConnectionManager:\n");
        report.append("- Network connections: ");
        report.append(stats.connectionCount).append(" connections, ");
        report.append(stats.handlerCount).append(" handlers\n");
        report.append("- Network activity: ");
        report.append(eventCount).append(" events, ");
        report.append(connects).append(" connects, ");
        report.append(disconnects).append(" disconnects, ");
        report.append(closes).append(" closes\n");
        report.append("- Network input: ");
        report.append(bytesIn).append(" bytes, ");
        report.append(msgsIn).append(" msgs, ");
        report.append(msgsIn*1000/sinceLast).append(" mps, ");
        long avgIn = (msgsIn == 0) ? 0 : (bytesIn/msgsIn);
        report.append(avgIn).append(" avg size, ");
        report.append(bytesIn*1000/sinceLast).append(" bps\n");
        report.append("- Network output: ");
        report.append(bytesOut).append(" bytes, ");
        report.append(msgsOut).append(" msgs, ");
        report.append(msgsOut*1000/sinceLast).append(" mps, ");
        long avgOut = (msgsOut == 0) ? 0 : (bytesOut/msgsOut);
        report.append(avgOut).append(" avg size, ");
        report.append(bytesOut*1000/sinceLast).append(" bps\n");
    }
607099
private function logActions(AbstractDataMigration $dataMigration)
    {
        $this->logger->debug('Dotdigitalgroup_Email data installer', [
            'type' => get_class($dataMigration),
            'rows_affected' => $dataMigration->getRowsAffected(),
        ]);

        if ($this->output) {
            $this->output->writeln(sprintf('%s: rows affected %s',
                get_class($dataMigration),
                $dataMigration->getRowsAffected()
            ));
        }
    }
715392
@Override
  public void addEntry(String logType, LogEntry entry) {
    if (!logTypesToInclude.contains(logType)) {
      return;
    }

    if (!localLogs.containsKey(logType)) {
      List<LogEntry> entries = new ArrayList<>();
      entries.add(entry);
      localLogs.put(logType, entries);
    } else {
      localLogs.get(logType).add(entry);
    }
  }
212942
public function writeReport(Report $report): void
    {
        $count = 0;

        $this->output->writeln('');
        $this->output->writeln('<comment>CHECKSTYLE REPORT</comment>');

        $styleMap = [
            Issue::SEVERITY_ERROR   => 'error',
            Issue::SEVERITY_WARNING => 'comment',
            Issue::SEVERITY_INFO    => 'info',
        ];

        foreach ($report->getFiles() as $file) {
            $this->output->writeln("=> <comment>{$file->getFilename()}</comment>.");
            foreach ($file->getIssues() as $issue) {
                $count++;

                $style = $styleMap[$issue->getSeverity()];

                $this->output->writeln(
                    sprintf(
                        '<comment>%4d <%s>%s</%s></comment>',
                        $issue->getLine() ?? 0,
                        $style,
                        $issue->getMessage(),
                        $style
                    )
                );
            }
        }

        $summary = [];

        foreach ($styleMap as $severity => $style) {
            $severityCount = $report->countIssuesBySeverity($severity);
            if ($severityCount > 0) {
                $summary[] = "<comment>$severityCount</comment> {$severity}s";
            }
        }

        $this->output->writeln("");
        $this->output->writeln('<comment>SUMMARY</comment>');
        $this->output->write("<info><comment>$count</comment> issues in total.</info>");

        if ($count > 0) {
            $this->output->writeln(" (" . implode(', ', $summary) . ")");
        }
    }
1332563
public function addAggregation(AbstractAggregation $abstractAggregation)
    {
        if (!$this->aggregations) {
            $this->aggregations = $this->createBuilderBag();
        }

        $this->aggregations->add($abstractAggregation);
        
        return $this;
    }
248815
public function aggregateByDateRange(
        string $filterName,
        string $field,
        array $options,
        int $applicationType,
        array $aggregationSort = Aggregation::SORT_BY_COUNT_DESC,
        int $limit = Aggregation::NO_LIMIT
    ): self {
        if (empty($options)) {
            return $this;
        }

        $this->aggregations[$filterName] = Aggregation::create(
            $filterName,
            Item::getPathByField($field),
            $applicationType,
            Filter::TYPE_DATE_RANGE,
            $options,
            $aggregationSort,
            $limit
        );

        return $this;
    }
113777
protected void addSubreportsToGroups() {
        for (Integer groupNum : groupFooterSubreports.keySet()) {
            List<Subreport> list = groupFooterSubreports.get(groupNum);
            DJGroup group = report.getColumnsGroups().get(groupNum - 1);
            group.getFooterSubreports().addAll(list);
        }

        for (Integer groupNum : groupHeaderSubreports.keySet()) {
            List<Subreport> list = groupHeaderSubreports.get(groupNum);
            DJGroup group = report.getColumnsGroups().get(groupNum - 1);
            group.getHeaderSubreports().addAll(list);
        }

    }
847311
public function addActionResult($action, $result)
    {
        if (is_null($action)) {
            throw new \RuntimeException(
                'Attempt to provide a result without providing an action',
                1294080509
            );
        }

        $this->results[$action] = $result;
    }
773776
function ReportLayoutAction(Layout $layout, Enums\Action $action)
    {
        $logItem = $this->CreateLogItem(Enums\ObjectType::Layout(), $action);       
        if (!$action->Equals(Enums\Action::Delete()))
        {
            $logLayout = new LogLayout();
            $logLayout->SetLogItem($logItem);
            $logLayout->SetLayout($layout);
            $logLayout->Save();
        }
        else
        {
            //pages are deleted in cascade
            $pages = Page::Schema()->FetchByLayout(false, $layout);
            foreach ($pages as $page)
            {
                $this->ReportPageAction($page, Enums\Action::Delete());
            }
        }
    }