wip watten
This commit is contained in:
1 parent
8ace316cbf
commit
afc8a6e1f5
93 files changed
+14369
-1
No files matched your search
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace HermannTelser\Watten\Tca;
|
||||
|
||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||
use TYPO3\CMS\Core\Database\Connection;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
class Configuration
|
||||
{
|
||||
/*
|
||||
* @param string $type
|
||||
* @return integer
|
||||
*/
|
||||
public static function eingabedatum(): int
|
||||
{
|
||||
// use last entry in ergebnisse as default
|
||||
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('tx_watten_domain_model_ergebnisse')->createQueryBuilder();
|
||||
$res = $queryBuilder
|
||||
->select('datum')
|
||||
->from('tx_watten_domain_model_ergebnisse')
|
||||
->addOrderBy('uid', 'DESC')
|
||||
->setMaxResults(1)
|
||||
->setFirstResult(0)
|
||||
->execute();
|
||||
$spieltag = 0;
|
||||
foreach ($res as $key => $value) {
|
||||
$spieltag = (int) $value['datum'];
|
||||
}
|
||||
return $spieltag;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user