Use news as example for recordview tracking in docs

As it most likely is the most used configuration.
Therefore it should be as easy as possible.
Also it matches more or less any Extbase plugin with nested structure.
This commit is contained in:
Daniel Siepmann 2020-08-03 10:31:06 +02:00
parent 644f5f241d
commit d754120517
2 changed files with 11 additions and 12 deletions

View file

@ -51,17 +51,16 @@ Let us examine an concrete example::
public: true public: true
arguments: arguments:
$rules: $rules:
topics: news:
matches: > matches: >
request.getQueryParams()["topic_id"] > 0 request.getQueryParams()["tx_news_pi1"] && request.getQueryParams()["tx_news_pi1"]["news"] > 0
and not (context.getAspect("backend.user").isLoggedIn()) and not (context.getAspect("backend.user").isLoggedIn())
and not (request.getHeader("User-Agent")[0] matches "/^TYPO3|TYPO3 linkvalidator/") and not (request.getHeader("User-Agent")[0] matches "/^TYPO3|TYPO3 linkvalidator/")
and not (request.getHeader("User-Agent")[0] matches "/^Codeception Testing/")
and not (request.getHeader("User-Agent")[0] matches "/Wget|curl|Go-http-client/") and not (request.getHeader("User-Agent")[0] matches "/Wget|curl|Go-http-client/")
and not (request.getHeader("User-Agent")[0] matches "/bot|spider|Slurp|Sogou|NextCloud-News|Feedly|XING FeedReader|SEOkicks|Seekport Crawler|ia_archiver|TrendsmapResolver|Nuzzel/") and not (request.getHeader("User-Agent")[0] matches "/bot|spider|Slurp|Sogou|NextCloud-News|Feedly|XING FeedReader|SEOkicks|Seekport Crawler|ia_archiver|TrendsmapResolver|Nuzzel/")
and not (request.getHeader("User-Agent")[0] matches "/mattermost|Slackbot|WhatsApp/") and not (request.getHeader("User-Agent")[0] matches "/mattermost|Slackbot|WhatsApp/")
recordUid: 'request.getQueryParams()["topic_id"]' recordUid: 'request.getQueryParams()["tx_news_pi1"]["news"]'
tableName: 'sys_category' tableName: 'tx_news_domain_model_news'
The first paragraph will not be explained, check out :ref:`t3coreapi:configure-dependency-injection-in-extensions` instead. The first paragraph will not be explained, check out :ref:`t3coreapi:configure-dependency-injection-in-extensions` instead.

View file

@ -28,24 +28,24 @@ Example widget configuration.
:file:`Configuration/Services.yaml`:: :file:`Configuration/Services.yaml`::
services: services:
dashboard.provider.danielsiepmann.tracking.records.topics: dashboard.provider.danielsiepmann.tracking.records.news:
class: 'DanielSiepmann\Tracking\Dashboard\Provider\Recordviews' class: 'DanielSiepmann\Tracking\Dashboard\Provider\Recordviews'
arguments: arguments:
$queryBuilder: '@querybuilder.tx_tracking_recordview' $queryBuilder: '@querybuilder.tx_tracking_recordview'
$recordTableLimitation: ['sys_category'] $recordTableLimitation: ['tx_news_domain_model_news']
dashboard.widget.danielsiepmann.tracking.records.topics: dashboard.widget.danielsiepmann.tracking.records.news:
class: 'TYPO3\CMS\Dashboard\Widgets\DoughnutChartWidget' class: 'TYPO3\CMS\Dashboard\Widgets\DoughnutChartWidget'
arguments: arguments:
$view: '@dashboard.views.widget' $view: '@dashboard.views.widget'
$dataProvider: '@dashboard.provider.danielsiepmann.tracking.records.topics' $dataProvider: '@dashboard.provider.danielsiepmann.tracking.records.news'
tags: tags:
- name: 'dashboard.widget' - name: 'dashboard.widget'
identifier: 'topicsDoughnut' identifier: 'newsDoughnut'
groupNames: 'tracking' groupNames: 'tracking'
iconIdentifier: 'content-widget-chart-pie' iconIdentifier: 'content-widget-chart-pie'
title: 'Topics' title: 'News'
description: 'Shows which topics are called most' description: 'Shows which news are called most'
additionalCssClasses: 'dashboard-item--chart' additionalCssClasses: 'dashboard-item--chart'
height: 'medium' height: 'medium'
width: 'small' width: 'small'