diff --git a/Classes/Action/CoachStats.php b/Classes/Frontend/Action/CoachStats.php
similarity index 97%
rename from Classes/Action/CoachStats.php
rename to Classes/Frontend/Action/CoachStats.php
index a554050..89b68d3 100644
--- a/Classes/Action/CoachStats.php
+++ b/Classes/Frontend/Action/CoachStats.php
@@ -1,6 +1,6 @@
seriesRepo = $seriesRepo ?: tx_rnbase::makeInstance(SeriesRepository::class);
+ }
+
+ /**
+ * @param RequestInterface $request
+ *
+ * @return string error msg or null
+ */
+ protected function handleRequest(RequestInterface $request)
+ {
+ $viewData = $request->getViewContext();
+
+ $filter = BaseFilter::createFilter($request, $this->getConfId().'filter.');
+ $fields = [];
+ $options = [];
+ $filter->init($fields, $options);
+
+ $items = $this->seriesRepo->search($fields, $options);
+
+ $viewData->offsetSet('items', $items);
+
+ return null;
+ }
+
+ protected function getTemplateName()
+ {
+ return 'serieslist';
+ }
+
+ protected function getViewClassName()
+ {
+ return ListView::class;
+ }
+}
diff --git a/Classes/Marker/CoachStatsMarker.php b/Classes/Frontend/Marker/CoachStatsMarker.php
similarity index 94%
rename from Classes/Marker/CoachStatsMarker.php
rename to Classes/Frontend/Marker/CoachStatsMarker.php
index 952716c..e86ad79 100644
--- a/Classes/Marker/CoachStatsMarker.php
+++ b/Classes/Frontend/Marker/CoachStatsMarker.php
@@ -1,20 +1,21 @@
getProperties(), $template, $marker);
+ $ignore = MarkerUtility::findUnusedAttributes($item, $template, $marker);
$markerArray = $formatter->getItemMarkerArrayWrapped($item->getProperties(), $confId, $ignore, $marker.'_');
$wrappedSubpartArray = [];
$subpartArray = [];
@@ -92,7 +93,7 @@ public function parseTemplate($template, $item, &$formatter, $confId, $marker =
*
* @param string $template
* @param CoachStat $item
- * @param tx_rnbase_util_FormatUtil $formatter
+ * @param FormatUtil $formatter
* @param string $confId
* @param string $markerPrefix
*
@@ -144,7 +145,7 @@ private function prepareFields($item, $template, $markerPrefix)
* @param array $markerArray
* @param array $wrappedSubpartArray
* @param string $confId
- * @param tx_rnbase_util_FormatUtil $formatter
+ * @param FormatUtil $formatter
*/
private function prepareLinks($item, $marker, &$markerArray, &$subpartArray, &$wrappedSubpartArray, $confId, &$formatter, $template)
{
diff --git a/Classes/Marker/PlayerStatsMarker.php b/Classes/Frontend/Marker/PlayerStatsMarker.php
similarity index 94%
rename from Classes/Marker/PlayerStatsMarker.php
rename to Classes/Frontend/Marker/PlayerStatsMarker.php
index da541d2..7b73207 100644
--- a/Classes/Marker/PlayerStatsMarker.php
+++ b/Classes/Frontend/Marker/PlayerStatsMarker.php
@@ -1,8 +1,10 @@
getProperties(), $template, $marker);
+ $ignore = MarkerUtility::findUnusedAttributes($item, $template, $marker);
$markerArray = $formatter->getItemMarkerArrayWrapped($item->getProperties(), $confId, $ignore, $marker.'_');
$wrappedSubpartArray = [];
$subpartArray = [];
@@ -101,7 +102,7 @@ public function parseTemplate($template, $item, &$formatter, $confId, $marker =
*
* @param string $template
* @param PlayerStat $item
- * @param tx_rnbase_util_FormatUtil $formatter
+ * @param FormatUtil $formatter
* @param string $confId
* @param string $markerPrefix
*
@@ -127,7 +128,7 @@ protected function addPlayer($template, $item, $formatter, $confId, $markerPrefi
*
* @param string $template
* @param PlayerStat $item
- * @param tx_rnbase_util_FormatUtil $formatter
+ * @param FormatUtil $formatter
* @param string $confId
* @param string $markerPrefix
*
@@ -153,7 +154,7 @@ protected function addCompetition($template, $item, $formatter, $confId, $marker
*
* @param string $template
* @param PlayerStat $item
- * @param tx_rnbase_util_FormatUtil $formatter
+ * @param FormatUtil $formatter
* @param string $confId
* @param string $markerPrefix
*
@@ -205,7 +206,7 @@ private function prepareFields($item, $template, $markerPrefix)
* @param array $markerArray
* @param array $wrappedSubpartArray
* @param string $confId
- * @param tx_rnbase_util_FormatUtil $formatter
+ * @param FormatUtil $formatter
*/
private function prepareLinks($item, $marker, &$markerArray, &$subpartArray, &$wrappedSubpartArray, $confId, &$formatter, $template)
{
diff --git a/Classes/Marker/RefereeStatsMarker.php b/Classes/Frontend/Marker/RefereeStatsMarker.php
similarity index 94%
rename from Classes/Marker/RefereeStatsMarker.php
rename to Classes/Frontend/Marker/RefereeStatsMarker.php
index 93d3a35..a2199da 100644
--- a/Classes/Marker/RefereeStatsMarker.php
+++ b/Classes/Frontend/Marker/RefereeStatsMarker.php
@@ -1,20 +1,21 @@
getProperty(), $template, $marker);
+ $ignore = MarkerUtility::findUnusedAttributes($item, $template, $marker);
$markerArray = $formatter->getItemMarkerArrayWrapped($item->getProperty(), $confId, $ignore, $marker.'_');
$wrappedSubpartArray = [];
$subpartArray = [];
@@ -92,7 +93,7 @@ public function parseTemplate($template, $item, &$formatter, $confId, $marker =
*
* @param string $template
* @param RefereeStat $item
- * @param tx_rnbase_util_FormatUtil $formatter
+ * @param FormatUtil $formatter
* @param string $confId
* @param string $markerPrefix
*
@@ -144,7 +145,7 @@ private function prepareFields($item, $template, $markerPrefix)
* @param array $markerArray
* @param array $wrappedSubpartArray
* @param string $confId
- * @param tx_rnbase_util_FormatUtil $formatter
+ * @param FormatUtil $formatter
*/
private function prepareLinks($item, $marker, &$markerArray, &$subpartArray, &$wrappedSubpartArray, $confId, &$formatter, $template)
{
diff --git a/Classes/Frontend/Marker/SeriesMarker.php b/Classes/Frontend/Marker/SeriesMarker.php
new file mode 100644
index 0000000..5198e9c
--- /dev/null
+++ b/Classes/Frontend/Marker/SeriesMarker.php
@@ -0,0 +1,91 @@
+setClassname(Series::class);
+ parent::__construct($options);
+ }
+
+ protected function prepareTemplate($template, $item, $formatter, $confId, $marker)
+ {
+ if (self::containsMarker($template, $marker . '_RESULTS')) {
+ $template = $this->addResults($template, $item, $formatter, $confId . 'category.', $marker . '_CATEGORY');
+ }
+ return $template;
+ }
+
+
+ /**
+ * Bindet den gefundenen Ergebnisse ein.
+ *
+ * @param string $template
+ * @param Series $item
+ * @param FormatUtil $formatter
+ * @param string $confId
+ * @param string $markerPrefix
+ *
+ * @return string
+ */
+ private function addResults($template, $item, $formatter, $confId, $markerPrefix)
+ {
+ $repo = RepositoryRegistry::getRepositoryForClass(SeriesResult::class);
+ $options = $fields = [];
+ $fields['SERIESRESULT.PARENTID'][OP_EQ_INT] = $item->getUid();
+ $fields['SERIESRESULT.RESULTTYPE'][OP_EQ] = SeriesResult::TYPE_BEST;
+ SearchBase::setConfigFields($fields, $formatter->getConfigurations(), $confId . 'fields.');
+ SearchBase::setConfigOptions($options, $formatter->getConfigurations(), $confId . 'options.');
+ $children = $repo->search($fields, $options);
+
+ $listBuilder = tx_rnbase::makeInstance(ListBuilder::class);
+ $out = $listBuilder->render($children, false, $template, SeriesResultMarker::class, $confId, $markerPrefix, $formatter);
+ return $out;
+
+ return $template;
+ }
+}
diff --git a/Classes/Frontend/Marker/SeriesResultMarker.php b/Classes/Frontend/Marker/SeriesResultMarker.php
new file mode 100644
index 0000000..452f8f8
--- /dev/null
+++ b/Classes/Frontend/Marker/SeriesResultMarker.php
@@ -0,0 +1,63 @@
+setClassname(SeriesResult::class);
+ parent::__construct($options);
+ }
+
+ protected function prepareTemplate($template, $item, $formatter, $confId, $marker)
+ {
+ // if (self::containsMarker($template, $marker . '_RESULTS')) {
+ // $template = $this->addResults($template, $item, $formatter, $confId . 'category.', $marker . '_CATEGORY');
+ // }
+ return $template;
+ }
+
+}
diff --git a/Classes/View/CoachStats.php b/Classes/Frontend/View/CoachStats.php
similarity index 93%
rename from Classes/View/CoachStats.php
rename to Classes/Frontend/View/CoachStats.php
index 876ef09..6eca437 100644
--- a/Classes/View/CoachStats.php
+++ b/Classes/Frontend/View/CoachStats.php
@@ -1,19 +1,19 @@
seriesRepo = $seriesRepo ?: tx_rnbase::makeInstance(SeriesRepository::class);
+ }
+
+ public function lookupSeries($config)
+ {
+ $seriesList = $this->seriesRepo->findAll();
+ foreach ($seriesList as $series) {
+ $config['items'][] = [$series->getName(), $series->getUid()];
+ }
+
+ return $config;
+ }
+
/**
* Returns all configured statistics type for flexform.
*
@@ -55,7 +72,7 @@ public static function lookupPlayerStatsReport($config)
public static function lookupCoachStatsReport($config)
{
if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['t3sportstats']['coachStats']['reports'])) {
- $types = Tx_Rnbase_Utility_Strings::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['t3sportstats']['coachStats']['reports']);
+ $types = Strings::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['t3sportstats']['coachStats']['reports']);
foreach ($types as $type) {
$config['items'][] = [$type, $type];
}
@@ -72,7 +89,7 @@ public static function lookupCoachStatsReport($config)
public static function lookupRefereeStatsReport($config)
{
if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['t3sportstats']['refereeStats']['reports'])) {
- $types = Tx_Rnbase_Utility_Strings::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['t3sportstats']['refereeStats']['reports']);
+ $types = Strings::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['t3sportstats']['refereeStats']['reports']);
foreach ($types as $type) {
$config['items'][] = [$type, $type];
}
@@ -100,7 +117,7 @@ private static function registerStatsReport($baseType, $statsType)
{
$current = [];
if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['t3sportstats'][$baseType]['reports'])) {
- $current = array_flip(Tx_Rnbase_Utility_Strings::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['t3sportstats'][$baseType]['reports']));
+ $current = array_flip(Strings::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['t3sportstats'][$baseType]['reports']));
}
if (!array_key_exists($statsType, $current)) {
$current = array_flip($current);
diff --git a/Configuration/Flexform/plugin_series.xml b/Configuration/Flexform/plugin_series.xml
new file mode 100644
index 0000000..9225cde
--- /dev/null
+++ b/Configuration/Flexform/plugin_series.xml
@@ -0,0 +1,130 @@
+
+
+