added database driven system configurations with admin screen (#647)

This commit is contained in:
Kevin Papst
2019-03-22 20:58:38 +01:00
committed by GitHub
parent e990ae4800
commit 13d9f8f3f7
142 changed files with 2262 additions and 64727 deletions

View File

@@ -0,0 +1,45 @@
<?php
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Configuration;
class TimesheetConfiguration implements SystemBundleConfiguration
{
use StringAccessibleConfigTrait;
public function getPrefix(): string
{
return 'timesheet';
}
public function isAllowFutureTimes(): bool
{
return (bool) $this->find('rules.allow_future_times');
}
public function isDurationOnly(): bool
{
return (bool) $this->find('duration_only');
}
public function isMarkdownEnabled(): bool
{
return (bool) $this->find('markdown_content');
}
public function getActiveEntriesHardLimit(): int
{
return (int) $this->find('active_entries.hard_limit');
}
public function getActiveEntriesSoftLimit(): int
{
return (int) $this->find('active_entries.soft_limit');
}
}