bnomei/kirby-blueprints

View on GitHub
classes/Blueprints/Attributes/Type.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

namespace Bnomei\Blueprints\Attributes;

use Attribute;
use Bnomei\Blueprints\Schema\FieldTypes;

#[Attribute(Attribute::TARGET_PROPERTY)]
class Type extends GenericAttribute
{
    /**
     * Set the type of the field from the list of official fields
     *
     * @see CustomType if you want to use a custom type like from a plugin
     */
    public function __construct(
        public FieldTypes|string $type
    ) {}
}