Update Composer packages
This commit is contained in:
parent
0320235f6c
commit
a8b68fb61b
378 changed files with 28466 additions and 28852 deletions
39
kirby/src/Uuid/StructureUuid.php
Normal file
39
kirby/src/Uuid/StructureUuid.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
namespace Kirby\Uuid;
|
||||
|
||||
use Kirby\Cms\Field;
|
||||
use Kirby\Cms\Structure;
|
||||
|
||||
/**
|
||||
* UUID for \Kirby\Cms\StructureObject
|
||||
*
|
||||
* Not yet supported
|
||||
* @todo Finish for uuid-block-structure-support
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @package Kirby Uuid
|
||||
* @author Nico Hoffmann <nico@getkirby.com>
|
||||
* @link https://getkirby.com
|
||||
* @copyright Bastian Allgeier
|
||||
* @license https://getkirby.com/license
|
||||
*/
|
||||
class StructureUuid extends FieldUuid
|
||||
{
|
||||
protected const TYPE = 'struct';
|
||||
protected const FIELD = 'structure';
|
||||
|
||||
/**
|
||||
* @var \Kirby\Cms\StructureObject|null
|
||||
*/
|
||||
public Identifiable|null $model;
|
||||
|
||||
/**
|
||||
* Converts content field to a Structure collection
|
||||
* @internal
|
||||
*/
|
||||
public static function fieldToCollection(Field $field): Structure
|
||||
{
|
||||
return $field->toStructure();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue