mirror of
https://github.com/flextype/flextype.git
synced 2025-08-08 06:06:45 +02:00
feat(fields): add ability to override fields - fix typo
This commit is contained in:
@@ -22,7 +22,7 @@ emitter()->addListener('onEntriesCreate', static function (): void {
|
||||
}
|
||||
|
||||
// Determine is the current field file path is the same.
|
||||
if (! strings(__FILE__)->replace(ROOT_DIR, '')->isEqual(entries()->registry()->get('methods.fetch.collection.fields.created_by.path'))) {
|
||||
if (! strings(__FILE__)->replace(ROOT_DIR, '')->isEqual(entries()->registry()->get('methods.create.collection.fields.created_by.path'))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@ emitter()->addListener('onEntriesCreate', static function (): void {
|
||||
}
|
||||
|
||||
// Determine is the current field file path is the same.
|
||||
if (! strings(__FILE__)->replace(ROOT_DIR, '')->isEqual(entries()->registry()->get('methods.fetch.collection.fields.published_by.path'))) {
|
||||
if (! strings(__FILE__)->replace(ROOT_DIR, '')->isEqual(entries()->registry()->get('methods.create.collection.fields.published_by.path'))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,7 @@ emitter()->addListener('onEntriesCreate', static function (): void {
|
||||
}
|
||||
|
||||
// Determine is the current field file path is the same.
|
||||
if (! strings(__FILE__)->replace(ROOT_DIR, '')->isEqual(entries()->registry()->get('methods.fetch.collection.fields.uuid.path'))) {
|
||||
if (! strings(__FILE__)->replace(ROOT_DIR, '')->isEqual(entries()->registry()->get('methods.create.collection.fields.uuid.path'))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
2
tests/fixtures/settings/settings.yaml
vendored
2
tests/fixtures/settings/settings.yaml
vendored
@@ -196,7 +196,7 @@ entries:
|
||||
path: "/src/flextype/core/Entries/Fields/Default/UuidField.php"
|
||||
id:
|
||||
enabled: true
|
||||
path: "/src/flextype/core/Entries/Fields/Default/IdField.php"
|
||||
path: "/src/flextype/core/Entries/Fields/Tokens/Items/IdField.php"
|
||||
calls:
|
||||
enabled: true
|
||||
path: "/src/flextype/core/Entries/Fields/Tokens/Items/CallsField.php"
|
||||
|
Reference in New Issue
Block a user