/** Datei: plugins/rest/library/ARUNOX/Plugins/REST/Generator/Components/Headline.php **/ * @copyright 2025 ARUNOX * @version 1.0.0 * @since 1.0.0 File is created */ namespace ARUNOX\Plugins\REST\Generator\Components; use ARUNOX\Plugins\REST\Generator\Config; use ARUNOX\Plugins\REST\Generator\Base\BaseGenerator; class Headline extends BaseGenerator { /* ### VARIABLES ################################################ # */ protected static ?string $PRIMARYKEY = "title"; protected ?string $GENERATOR = "headline"; protected array $ALLOWED_CONFIG = [ "title" => Config\Type::String, "size" => Config\Type::Int, "icon" => Config\Type::String, "emoji" => Config\Type::String, "color" => Config\Color::class, ]; /* ### PUBLIC FUNCTIONS ######################################### # */ /* ### MAGIC FUNCTIONS ########################################## # */ public function __construct( string $title, int $size = 1 ) { parent::__construct(); $this->setTitle( $title ); $this->setSize( $size ); } } /** Datei: plugins/rest/library/ARUNOX/Plugins/REST/Generator/Components/Button/Button.php **/ * @copyright 2025 ARUNOX * @version 1.0.0 * @since 1.0.0 File is created */ namespace ARUNOX\Plugins\REST\Generator\Components; use ARUNOX\Plugins\REST\Generator\Config; use ARUNOX\Plugins\REST\Generator\Base\BaseGenerator; use ARUNOX\Plugins\REST\Generator\Helpers\ActionHelpers; use ARUNOX\Plugins\REST\Generator\Components\Button\Type; class Button extends BaseGenerator { /* ### TRAITS ################################################### # */ use ActionHelpers; /* ### VARIABLES ################################################ # */ protected static ?string $PRIMARYKEY = "label"; protected ?string $GENERATOR = "button"; protected array $ALLOWED_CONFIG = [ "value" => Config\Type::Scalar, "name" => Config\Type::String, "label" => Config\Type::String, "href" => Config\Type::String, "target" => Config\Type::String, "title" => Config\Type::String, "icon" => Config\Type::String, "emoji" => Config\Type::String, "plural" => Config\Type::String, "order" => Config\Type::Array, "visibility" => Config\Type::Array, "color" => Config\Color::class, "type" => Type::class, "dropdowns" => [ "generator" => Button::class, "args" => [], ], ]; /* ### PUBLIC FUNCTIONS ######################################### # */ public function setDropdowns( $args ) { return $this->addDropdowns( ...$args ); } public function addDropdown( ...$args ) { // show( "dropdowns", $args ); return $this->add( "dropdowns", ...$args ); } public function addDropdowns( ...$args ) { foreach( $args as $arg ) { $this->addDropdown( ...$arg ); } return $this; } /* ### MAGIC FUNCTIONS ########################################## # */ } /** Datei: plugins/rest/library/ARUNOX/Plugins/REST/Generator/Components/Button/Type.php **/ * @copyright 2025 ARUNOX * @version 1.0.0 * @since 1.0.0 File is created */ namespace ARUNOX\Plugins\REST\Generator\Components\Button; /* ### ENUMS ######################################################## # */ enum Type : string { case Link = "link"; case Button = "button"; case Submit = "submit"; case Cancel = "cancel"; case Reset = "reset"; /* ### MAGIC FUNCTIONS ########################################## # */ } /** Datei: plugins/rest/library/ARUNOX/Plugins/REST/Generator/Components/Paragraph.php **/ * @copyright 2025 ARUNOX * @version 1.0.0 * @since 1.0.0 File is created */ namespace ARUNOX\Plugins\REST\Generator\Components; use ARUNOX\Plugins\REST\Generator\Config; use ARUNOX\Plugins\REST\Generator\Base\BaseGenerator; class Paragraph extends BaseGenerator { /* ### VARIABLES ################################################ # */ protected static ?string $PRIMARYKEY = "text"; protected ?string $GENERATOR = "paragraph"; protected array $ALLOWED_CONFIG = [ "text" => Config\Type::String, "icon" => Config\Type::String, "emoji" => Config\Type::String, "color" => Config\Color::class, ]; /* ### PUBLIC FUNCTIONS ######################################### # */ /* ### MAGIC FUNCTIONS ########################################## # */ public function __construct( ?string $text = NULL ) { parent::__construct(); $this->setText( $text ); } }