TYPO3 v15 dev-main snapshot ()

This commit is contained in:
2026-08-10 22:31:14 +02:00
commit ff4622ba97
138 changed files with 9045 additions and 0 deletions
+89
View File
@@ -0,0 +1,89 @@
<?php
declare(strict_types=1);
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Dashboard\Widgets;
readonly class WidgetConfiguration implements WidgetConfigurationInterface
{
/**
* @throws \InvalidArgumentException If non valid parameters were provided.
*/
public function __construct(
private string $identifier,
private string $serviceName,
private array $groupNames,
private string $title,
private string $description,
private string $iconIdentifier,
private string $height,
private string $width,
private bool $adminOnly = false,
) {
$allowedSizes = ['small', 'medium', 'large'];
if (!in_array($height, $allowedSizes, true)) {
throw new \InvalidArgumentException('Height of widgets has to be small, medium or large', 1584778196);
}
if (!in_array($width, $allowedSizes, true)) {
throw new \InvalidArgumentException('Width of widgets has to be small, medium or large', 1585249769);
}
}
public function getIdentifier(): string
{
return $this->identifier;
}
public function getServiceName(): string
{
return $this->serviceName;
}
public function getGroupNames(): array
{
return $this->groupNames;
}
public function getTitle(): string
{
return $this->title;
}
public function getDescription(): string
{
return $this->description;
}
public function getIconIdentifier(): string
{
return $this->iconIdentifier;
}
public function getHeight(): string
{
return $this->height;
}
public function getWidth(): string
{
return $this->width;
}
public function isAdminOnly(): bool
{
return $this->adminOnly;
}
}