allow to configure the amount of recent activity rows in an empty week (#3026)
This commit is contained in:
@@ -9,33 +9,61 @@
|
||||
|
||||
namespace App\Form\Model;
|
||||
|
||||
class SystemConfiguration
|
||||
final class SystemConfiguration
|
||||
{
|
||||
/** @deprecated since 1.16.10 */
|
||||
public const SECTION_ROUNDING = 'rounding';
|
||||
/** @deprecated since 1.16.10 */
|
||||
public const SECTION_LOCKDOWN = 'lockdown_period';
|
||||
/** @deprecated since 1.16.10 */
|
||||
public const SECTION_TIMESHEET = 'timesheet';
|
||||
/** @deprecated since 1.16.10 */
|
||||
public const SECTION_FORM_INVOICE = 'invoice';
|
||||
/** @deprecated since 1.16.10 */
|
||||
public const SECTION_FORM_CUSTOMER = 'customer';
|
||||
/** @deprecated since 1.16.10 */
|
||||
public const SECTION_FORM_USER = 'user';
|
||||
/** @deprecated since 1.16.10 */
|
||||
public const SECTION_THEME = 'theme';
|
||||
/** @deprecated since 1.16.10 */
|
||||
public const SECTION_AUTHENTICATION = 'authentication';
|
||||
/** @deprecated since 1.16.10 */
|
||||
public const SECTION_CALENDAR = 'calendar';
|
||||
/** @deprecated since 1.16.10 */
|
||||
public const SECTION_BRANDING = 'branding';
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $section;
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $translation;
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
private $translationDomain = 'system-configuration';
|
||||
/**
|
||||
* @var Configuration[]
|
||||
*/
|
||||
private $configuration = [];
|
||||
|
||||
public function __construct(?string $section = null)
|
||||
{
|
||||
$this->section = $section;
|
||||
}
|
||||
|
||||
public function getSection(): ?string
|
||||
{
|
||||
return $this->section;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 1.16.10
|
||||
* @param string|null $section
|
||||
* @return $this
|
||||
*/
|
||||
public function setSection(?string $section): SystemConfiguration
|
||||
{
|
||||
$this->section = $section;
|
||||
@@ -43,6 +71,30 @@ class SystemConfiguration
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setTranslation(string $translation): SystemConfiguration
|
||||
{
|
||||
$this->translation = $translation;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getTranslation(): string
|
||||
{
|
||||
return $this->translation ?? $this->section;
|
||||
}
|
||||
|
||||
public function setTranslationDomain(string $domain): SystemConfiguration
|
||||
{
|
||||
$this->translationDomain = $domain;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getTranslationDomain(): string
|
||||
{
|
||||
return $this->translationDomain;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Configuration[]
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user