Skip to content

Commit

Permalink
✨ added entries field
Browse files Browse the repository at this point in the history
https://getkirby.com/releases/5/entries-field
Signed-off-by: Bruno Meilick <b@bnomei.com>
  • Loading branch information
bnomei committed Feb 11, 2025
1 parent 533fb5f commit 327f061
Show file tree
Hide file tree
Showing 8 changed files with 242 additions and 215 deletions.
18 changes: 18 additions & 0 deletions classes/Blueprints/Attributes/Field.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace Bnomei\Blueprints\Attributes;

use Attribute;

#[Attribute(Attribute::TARGET_PROPERTY)]
class Field extends GenericAttribute
{
/**
* The entries field allows you to create and manage multiple entries for the same field.
* It offers editors a flexible alternative to the structure field for when they need to
* handle a list of content that only consists of one field.
*/
public function __construct(
public array $field = []
) {}
}
1 change: 1 addition & 0 deletions classes/Blueprints/Schema/FieldTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ enum FieldTypes: string
case COLOR = 'color';
case DATE = 'date';
case EMAIL = 'email';
case ENTRIES = 'entries';
case FILES = 'files';
case GAP = 'gap';
case GROUP = 'group';
Expand Down
2 changes: 2 additions & 0 deletions classes/Ink.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ class Ink

const FIELDSETS = 'fieldsets';

const FIELD = 'field';

const FIELDS = 'fields';

const FILES = 'files';
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bnomei/kirby-blueprints",
"type": "kirby-plugin",
"version": "5.1.0",
"version": "5.1.1",
"license": "proprietary",
"description": "PHP Class-based Blueprints for Kirby CMS for better type safety and code completion",
"authors": [
Expand Down
Loading

0 comments on commit 327f061

Please sign in to comment.