38 lines
941 B
PHP
38 lines
941 B
PHP
<?php
|
|
namespace Evomedien\Vitec\Widgets;
|
|
|
|
use TYPO3\CMS\Dashboard\Widgets\WidgetInterface;
|
|
use TYPO3\CMS\Dashboard\Widgets\WidgetConfiguration;
|
|
|
|
class VitecWidget implements WidgetInterface
|
|
{
|
|
private WidgetConfiguration $configuration;
|
|
|
|
public function __construct(WidgetConfiguration $configuration)
|
|
{
|
|
$this->configuration = $configuration;
|
|
}
|
|
|
|
public function render(): string
|
|
{
|
|
// Render the widget container
|
|
return '<div class="vitec-widget">' . $this->renderWidgetContent() . '</div>';
|
|
}
|
|
|
|
public function renderWidgetContent(): string
|
|
{
|
|
// Render the actual widget content
|
|
return '<div>Welcome to the Vitec custom widget!</div>';
|
|
}
|
|
|
|
public function getOptions(): array
|
|
{
|
|
// Return widget options (if any)
|
|
return [];
|
|
}
|
|
|
|
public function getConfiguration(): WidgetConfiguration
|
|
{
|
|
return $this->configuration;
|
|
}
|
|
} |