Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions features/FieldTypeForm/checkbox_fieldtype_edit_form.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ Feature: Checkbox field value edit form
I want the Checkbox field form to implement the FieldType's behaviour

Background:
Given a content type with an ezboolean field definition
Given a content type with an ibexa_boolean field definition

Scenario: The attributes of the field have a form representation
When I view the edit form for this field
Then the edit form should contain an identifiable widget for ezboolean field definition
Then the edit form should contain an identifiable widget for ibexa_boolean field definition
And it should contain a checkbox input field

Scenario: The input fields are flagged as required when the field definition is required
Given the field definition is required
When I view the edit form for this field
Then the value input fields for ezboolean field should be flagged as required
Then the value input fields for ibexa_boolean field should be flagged as required
4 changes: 2 additions & 2 deletions features/FieldTypeForm/selection_fieldtype_edit_form.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Feature: Selection field value edit form
I want the Selection field form to implement the FieldType's behaviour

Background:
Given a content type with an ezselection field definition
Given a content type with an ibexa_selection field definition

Scenario: The attributes of the field have a form representation
Given I view the edit form for this field
Then the edit form should contain an identifiable widget for ezselection field definition
Then the edit form should contain an identifiable widget for ibexa_selection field definition
And it should contain a select field

Scenario: The options added to a field definition have a form representation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Feature: TextLine field value edit form
In order to edit content of a TextLine fields
As an integrator
I want the ezuser field form to implement the FieldType's behaviour
I want the ibexa_user field form to implement the FieldType's behaviour

Background:
Given a content type with a textline field definition
Expand Down
4 changes: 2 additions & 2 deletions features/FieldTypeForm/user_fieldtype_edit_form.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Feature: User field value edit form
In order to edit content of ezuser fields
In order to edit content of ibexa_user fields
As an integrator
I want the ezuser field form to implement the FieldType's behaviour
I want the ibexa_user field form to implement the FieldType's behaviour

Background:
Given a content type with a user field definition
Expand Down
48 changes: 24 additions & 24 deletions src/bundle/Resources/config/fieldtypes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,51 +25,51 @@ services:

Ibexa\ContentForms\FieldType\Mapper\AuthorFormMapper:
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezauthor }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_author }

Ibexa\ContentForms\FieldType\Mapper\BinaryFileFormMapper:
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezbinaryfile }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_binaryfile }

Ibexa\ContentForms\FieldType\Mapper\CheckboxFormMapper:
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezboolean }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_boolean }

Ibexa\ContentForms\FieldType\Mapper\SelectionFormMapper:
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezselection }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_selection }

Ibexa\ContentForms\FieldType\Mapper\CountryFormMapper:
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezcountry }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_country }

Ibexa\ContentForms\FieldType\Mapper\DateFormMapper:
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezdate }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_date }

Ibexa\ContentForms\FieldType\Mapper\DateTimeFormMapper:
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezdatetime }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_datetime }

Ibexa\ContentForms\FieldType\Mapper\FloatFormMapper:
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezfloat }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_float }

Ibexa\ContentForms\FieldType\Mapper\ImageFormMapper:
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezimage }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_image }

Ibexa\ContentForms\FieldType\Mapper\IntegerFormMapper:
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezinteger }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_integer }

Ibexa\ContentForms\FieldType\Mapper\ISBNFormMapper:
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezisbn }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_isbn }

Ibexa\ContentForms\FieldType\Mapper\MediaFormMapper:
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezmedia }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_media }

Ibexa\ContentForms\FieldType\Mapper\AbstractRelationFormMapper:
abstract: true
Expand All @@ -82,57 +82,57 @@ services:
autoconfigure: false
public: false
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezobjectrelation }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_object_relation }

Ibexa\ContentForms\FieldType\Mapper\RelationListFormMapper:
parent: Ibexa\ContentForms\FieldType\Mapper\AbstractRelationFormMapper
autowire: true
autoconfigure: false
public: false
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezobjectrelationlist }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_object_relation_list }

Ibexa\ContentForms\FieldType\Mapper\TextLineFormMapper:
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezstring }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_string }

Ibexa\ContentForms\FieldType\Mapper\TextBlockFormMapper:
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: eztext }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_text }

Ibexa\ContentForms\FieldType\Mapper\TimeFormMapper:
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: eztime }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_time }

Ibexa\ContentForms\FieldType\Mapper\FormTypeBasedFieldValueFormMapper:
abstract: true

Ibexa\ContentForms\FieldType\Mapper\UserAccountFieldValueFormMapper:
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezuser }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_user }

Ibexa\ContentForms\FieldType\Mapper\UrlFormMapper:
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezurl }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_url }

Ibexa\ContentForms\FieldType\Mapper\MapLocationFormMapper:
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezgmaplocation }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_gmap_location }

Ibexa\ContentForms\FieldType\Mapper\KeywordFormMapper:
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezkeyword }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_keyword }

ibexa.content_forms.field_type.form_mapper.ezemail:
ibexa.content_forms.field_type.form_mapper.ibexa_email:
parent: Ibexa\ContentForms\FieldType\Mapper\FormTypeBasedFieldValueFormMapper
autowire: true
autoconfigure: false
public: false
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezemail }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_email }
calls:
- [setFormType, ['Symfony\Component\Form\Extension\Core\Type\EmailType']]

Ibexa\ContentForms\FieldType\Mapper\ImageAssetFormMapper:
tags:
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ezimageasset }
- { name: ibexa.admin_ui.field_type.form.mapper.value, fieldType: ibexa_image_asset }
4 changes: 3 additions & 1 deletion src/bundle/Resources/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ parameters:
ibexa.content_forms.user_content_type_identifier: "user"

services:
Ibexa\ContentForms\FieldType\FieldTypeFormMapperDispatcher: ~
Ibexa\ContentForms\FieldType\FieldTypeFormMapperDispatcher:
arguments:
$fieldTypeAliasResolver: '@Ibexa\Core\FieldType\FieldTypeAliasResolverInterface'

Ibexa\ContentForms\Form\Type\Content\ContentFieldType:
arguments: ['@Ibexa\ContentForms\FieldType\FieldTypeFormMapperDispatcher']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,100 +16,100 @@
<target state="new">Remove</target>
<note>key: content.field_type.binary_base.remove</note>
</trans-unit>
<trans-unit id="db5d6f82fe5ba6f40d1d159dca89c659c76aad06" resname="content.field_type.ezauthor.email">
<trans-unit id="db5d6f82fe5ba6f40d1d159dca89c659c76aad06" resname="content.field_type.ibexa_author.email">
<source>Email</source>
<target state="new">Email</target>
<note>key: content.field_type.ezauthor.email</note>
<note>key: content.field_type.ibexa_author.email</note>
</trans-unit>
<trans-unit id="05fe48833d61c38f4c532c34c4b6fdad323e1fe1" resname="content.field_type.ezauthor.name">
<trans-unit id="05fe48833d61c38f4c532c34c4b6fdad323e1fe1" resname="content.field_type.ibexa_author.name">
<source>Name</source>
<target state="new">Name</target>
<note>key: content.field_type.ezauthor.name</note>
<note>key: content.field_type.ibexa_author.name</note>
</trans-unit>
<trans-unit id="79843ce578133501bb420c52cd410a113dcfaefb" resname="content.field_type.ezgmaplocation.address">
<trans-unit id="79843ce578133501bb420c52cd410a113dcfaefb" resname="content.field_type.ibexa_gmap_location.address">
<source>Address</source>
<target state="new">Address</target>
<note>key: content.field_type.ezgmaplocation.address</note>
<note>key: content.field_type.ibexa_gmap_location.address</note>
</trans-unit>
<trans-unit id="2fcb1cae76dae0c5ddda6446822bf2d656e84601" resname="content.field_type.ezgmaplocation.latitude">
<trans-unit id="2fcb1cae76dae0c5ddda6446822bf2d656e84601" resname="content.field_type.ibexa_gmap_location.latitude">
<source>Latitude</source>
<target state="new">Latitude</target>
<note>key: content.field_type.ezgmaplocation.latitude</note>
<note>key: content.field_type.ibexa_gmap_location.latitude</note>
</trans-unit>
<trans-unit id="f598e2bedb749c004e232b9c3f0cffbc08f9c491" resname="content.field_type.ezgmaplocation.longitude">
<trans-unit id="f598e2bedb749c004e232b9c3f0cffbc08f9c491" resname="content.field_type.ibexa_gmap_location.longitude">
<source>Longitude</source>
<target state="new">Longitude</target>
<note>key: content.field_type.ezgmaplocation.longitude</note>
<note>key: content.field_type.ibexa_gmap_location.longitude</note>
</trans-unit>
<trans-unit id="aa904d94a0f6df2084d669e82dac178189509aab" resname="content.field_type.ezimage.alternative_text">
<trans-unit id="aa904d94a0f6df2084d669e82dac178189509aab" resname="content.field_type.ibexa_image.alternative_text">
<source>Alternative text</source>
<target state="new">Alternative text</target>
<note>key: content.field_type.ezimage.alternative_text</note>
<note>key: content.field_type.ibexa_image.alternative_text</note>
</trans-unit>
<trans-unit id="5da12c12b4df6790c55fb4d0b11f72fa621b0d1f" resname="content.field_type.ezimageasset.alternative_text">
<trans-unit id="5da12c12b4df6790c55fb4d0b11f72fa621b0d1f" resname="content.field_type.ibexa_image_asset.alternative_text">
<source>Alternative text</source>
<target state="new">Alternative text</target>
<note>key: content.field_type.ezimageasset.alternative_text</note>
<note>key: content.field_type.ibexa_image_asset.alternative_text</note>
</trans-unit>
<trans-unit id="7162d22b1be8aaa634e57fa94cc2664026be4390" resname="content.field_type.ezmedia.autoplay">
<trans-unit id="7162d22b1be8aaa634e57fa94cc2664026be4390" resname="content.field_type.ibexa_media.autoplay">
<source>Autoplay</source>
<target state="new">Autoplay</target>
<note>key: content.field_type.ezmedia.autoplay</note>
<note>key: content.field_type.ibexa_media.autoplay</note>
</trans-unit>
<trans-unit id="f0176a5e197c6c207e09affb1a027db2ab48a506" resname="content.field_type.ezmedia.display_controls">
<trans-unit id="f0176a5e197c6c207e09affb1a027db2ab48a506" resname="content.field_type.ibexa_media.display_controls">
<source>Display controls</source>
<target state="new">Display controls</target>
<note>key: content.field_type.ezmedia.display_controls</note>
<note>key: content.field_type.ibexa_media.display_controls</note>
</trans-unit>
<trans-unit id="eb3b924b6a2d94344ea5e1e51636ef5b92a7a57a" resname="content.field_type.ezmedia.height">
<trans-unit id="eb3b924b6a2d94344ea5e1e51636ef5b92a7a57a" resname="content.field_type.ibexa_media.height">
<source>Height</source>
<target state="new">Height</target>
<note>key: content.field_type.ezmedia.height</note>
<note>key: content.field_type.ibexa_media.height</note>
</trans-unit>
<trans-unit id="48e4eb02443e58b9ff501ca03bdc4008e842eba4" resname="content.field_type.ezmedia.loop">
<trans-unit id="48e4eb02443e58b9ff501ca03bdc4008e842eba4" resname="content.field_type.ibexa_media.loop">
<source>Loop</source>
<target state="new">Loop</target>
<note>key: content.field_type.ezmedia.loop</note>
<note>key: content.field_type.ibexa_media.loop</note>
</trans-unit>
<trans-unit id="e5940ee516f3edb1d09e7ac4eed4fe7a28d3cacd" resname="content.field_type.ezmedia.width">
<trans-unit id="e5940ee516f3edb1d09e7ac4eed4fe7a28d3cacd" resname="content.field_type.ibexa_media.width">
<source>Width</source>
<target state="new">Width</target>
<note>key: content.field_type.ezmedia.width</note>
<note>key: content.field_type.ibexa_media.width</note>
</trans-unit>
<trans-unit id="25850f96dbb0457a35063e29e92a26cbba2de07d" resname="content.field_type.ezurl.link">
<trans-unit id="25850f96dbb0457a35063e29e92a26cbba2de07d" resname="content.field_type.ibexa_url.link">
<source>URL</source>
<target state="new">URL</target>
<note>key: content.field_type.ezurl.link</note>
<note>key: content.field_type.ibexa_url.link</note>
</trans-unit>
<trans-unit id="e6ca454559e2a762b64c43847db1e227b3077540" resname="content.field_type.ezurl.text">
<trans-unit id="e6ca454559e2a762b64c43847db1e227b3077540" resname="content.field_type.ibexa_url.text">
<source>Text</source>
<target state="new">Text</target>
<note>key: content.field_type.ezurl.text</note>
<note>key: content.field_type.ibexa_url.text</note>
</trans-unit>
<trans-unit id="7a3eb3ea13db1c9d6a0bd64c7d249a45e7b83b52" resname="content.field_type.ezuser.email">
<trans-unit id="7a3eb3ea13db1c9d6a0bd64c7d249a45e7b83b52" resname="content.field_type.ibexa_user.email">
<source>Email</source>
<target state="new">Email</target>
<note>key: content.field_type.ezuser.email</note>
<note>key: content.field_type.ibexa_user.email</note>
</trans-unit>
<trans-unit id="8ac4ec40153c80fd39d2051802e30ebffb6f1fe1" resname="content.field_type.ezuser.enabled">
<trans-unit id="8ac4ec40153c80fd39d2051802e30ebffb6f1fe1" resname="content.field_type.ibexa_user.enabled">
<source>Enabled</source>
<target state="new">Enabled</target>
<note>key: content.field_type.ezuser.enabled</note>
<note>key: content.field_type.ibexa_user.enabled</note>
</trans-unit>
<trans-unit id="4c65e5d17516c19e311161e374bbd39f053b5e6b" resname="content.field_type.ezuser.password">
<trans-unit id="4c65e5d17516c19e311161e374bbd39f053b5e6b" resname="content.field_type.ibexa_user.password">
<source>Password</source>
<target state="new">Password</target>
<note>key: content.field_type.ezuser.password</note>
<note>key: content.field_type.ibexa_user.password</note>
</trans-unit>
<trans-unit id="d2fe533f4032896195d524038c3abeb2209adece" resname="content.field_type.ezuser.password_confirm">
<trans-unit id="d2fe533f4032896195d524038c3abeb2209adece" resname="content.field_type.ibexa_user.password_confirm">
<source>Confirm password</source>
<target state="new">Confirm password</target>
<note>key: content.field_type.ezuser.password_confirm</note>
<note>key: content.field_type.ibexa_user.password_confirm</note>
</trans-unit>
<trans-unit id="d1f5c5fcee7eb206e496dd5073b0f95427431a1c" resname="content.field_type.ezuser.username">
<trans-unit id="d1f5c5fcee7eb206e496dd5073b0f95427431a1c" resname="content.field_type.ibexa_user.username">
<source>Username</source>
<target state="new">Username</target>
<note>key: content.field_type.ezuser.username</note>
<note>key: content.field_type.ibexa_user.username</note>
</trans-unit>
<trans-unit id="1d777459cd2f508bdb4676d48eaeee62e11d3009" resname="content_forms.relation.location_type">
<source>Select Starting Location</source>
Expand Down
6 changes: 3 additions & 3 deletions src/lib/Behat/Context/ContentEditContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public function iAmOnTheViewOfTheContentThatWasPublished(): void
throw new \Exception('No created content name set');
}

$this->assertElementOnPage('span.ezstring-field');
$this->assertElementContainsText('span.ezstring-field', $this->createdContentName);
$this->assertElementOnPage('span.ibexa_string-field');
$this->assertElementContainsText('span.ibexa_string-field', $this->createdContentName);
}

/**
Expand Down Expand Up @@ -169,7 +169,7 @@ public function thereIsAContentTypeWithAnyKindOfConstraintsOnAFieldDefinition():
new FieldDefinitionCreateStruct(
[
'identifier' => self::$constrainedFieldIdentifier,
'fieldTypeIdentifier' => 'ezstring',
'fieldTypeIdentifier' => 'ibexa_string',
'names' => ['eng-GB' => 'Field'],
'validatorConfiguration' => [
'StringLengthValidator' => ['minStringLength' => 5, 'maxStringLength' => 10],
Expand Down
Loading
Loading