first commit

This commit is contained in:
salam committed 2026-10-06 19:40:28 +02:00
commit e81864e683
2984 files changed
+267797

No files matched your search

@@ -0,0 +1,40 @@
<?php
namespace HermannTelser\Zuladungsliste\Utilities;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\PathUtility;
/**
* Class FileUtility
*/
class FileUtility extends AbstractUtility
{
/**
* @param string $path Absolute path
* @throws \Exception
*/
public static function createFolderIfNotExists(string $path)
{
if (!is_dir($path) && !GeneralUtility::mkdir($path)) {
throw new \UnexpectedValueException(
'Folder ' . self::getRelativeFolderFromAbsolutePath($path) . ' does not exists and can not be created!',
1516373962125
);
}
}
/**
* Get relative path from absolute path, but don't touch if it's already a relative path
*
* @param string $path
* @return string
*/
public static function getRelativeFolderFromAbsolutePath(string $path): string
{
if (PathUtility::isAbsolutePath($path)) {
$path = PathUtility::getRelativePathTo($path);
}
return $path;
}
}
@@ -0,0 +1,36 @@
<?php
namespace HermannTelser\Zuladungsliste\Utilities;
class Message
{
public static function error($filename, $linenumber, $message)
{
die(PHP_EOL.PHP_EOL.
'-----------------------------------------------------------'.PHP_EOL.
'DOKUMENT: '.$filename.PHP_EOL.
'ZEILE: '.$linenumber.PHP_EOL.
'FEHLER: '.$message.PHP_EOL.
"\nVerarbeitung gestoppt !".PHP_EOL.
'-----------------------------------------------------------'.PHP_EOL.
PHP_EOL);
}
public static function debug($filename, $linenumber, $message)
{
echo PHP_EOL.
'-----------------------------------------------------------'.PHP_EOL.
'file: '.$filename.PHP_EOL.
'line: '.$linenumber.PHP_EOL.
'note: '.$message.PHP_EOL.
'-----------------------------------------------------------'.PHP_EOL.PHP_EOL;
}
public static function note($message)
{
echo PHP_EOL.
'-----------------------------------------------------------'.PHP_EOL.PHP_EOL.
$message.PHP_EOL.PHP_EOL.
'-----------------------------------------------------------'.PHP_EOL.PHP_EOL;
}
}
@@ -0,0 +1,72 @@
<?php
namespace HermannTelser\Zuladungsliste\Utilities;
class Resources
{
public static function displaymenu()
{
return [
['label' => 'Begründungen', 'id' => 'begruendung', 'ckecked' => false],
['label' => 'Titel', 'id' => 'titel', 'ckecked' => false],
['label' => 'Name', 'id' => 'name', 'ckecked' => true],
['label' => 'Geburtsdatum', 'id' => 'geburtsdatum', 'ckecked' => true],
['label' => 'Vereidigung', 'id' => 'vereidigung', 'ckecked' => true],
['label' => 'Ältest Projekt in Wertung', 'id' => 'aeltesterEntscheidungstermin', 'ckecked' => false],
['label' => 'Punkte', 'id' => 'punkte', 'ckecked' => true],
['label' => 'Sperre', 'id' => 'sperre', 'ckecked' => true],
['label' => 'Id', 'id' => 'id', 'ckecked' => false]
];
}
public static function sperren()
{
return [
['id' => '1', 'label' => 'Default', 'value' => '0', 'selected' => true],
['id' => '2', 'label' => '3 Monare', 'value' => '3'],
['id' => '3', 'label' => '4 Monare', 'value' => '4'],
['id' => '4', 'label' => '5 Monare', 'value' => '5'],
['id' => '5', 'label' => '6 Monare', 'value' => '6'],
['id' => '6', 'label' => '8 Monare', 'value' => '8'],
['id' => '7', 'label' => '10 Monare', 'value' => '10'],
['id' => '8', 'label' => '12 Monare', 'value' => '12'],
['id' => '9', 'label' => '18 Monare', 'value' => '18'],
['id' => '10', 'label' => '24 Monare', 'value' => '24'],
];
}
public static function bundeslaender()
{
return [
'Burgenland',
'Kärnten',
'Niederösterreich',
'Oberösterreich',
'Salzburg',
'Steiermark',
'Tirol',
'Vorarlberg',
'Wien'
];
}
public static function years()
{
$arr = range(2012, date('Y'));
rsort($arr);
return $arr;
}
public static function next()
{
return[
['id' => '1', 'label' => 'Nächste(r)'],
['id' => '2', 'label' => 'Nächsten Zwei'] ,
['id' => '3', 'label' => 'Nächsten Drei'] ,
['id' => '4', 'label' => 'Nächsten Vier'] ,
['id' => '5', 'label' => 'Nächsten Fünf'] ,
['id' => '6', 'label' => 'Nächsten Sechs']
];
}
}