Skip to content

Commit 2c4bfe6

Browse files
authored
IBX-9947: Rebranded field type identifiers (#41)
1 parent f4515d1 commit 2c4bfe6

13 files changed

+21
-20
lines changed

spec/GraphQL/ContentQueryFieldDefinitionMapperSpec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
class ContentQueryFieldDefinitionMapperSpec extends ObjectBehavior
1919
{
2020
public const FIELD_IDENTIFIER = 'test';
21-
public const FIELD_TYPE_IDENTIFIER = 'ezcontentquery';
21+
public const FIELD_TYPE_IDENTIFIER = 'ibexa_content_query';
2222
public const RETURNED_CONTENT_TYPE_IDENTIFIER = 'folder';
2323
public const GRAPHQL_TYPE = 'FolderContent';
2424

spec/QueryFieldServiceSpec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ private function getContentType(array $parameters, bool $enablePagination = true
148148
'fieldDefinitions' => new Values\ContentType\FieldDefinitionCollection([
149149
new Values\ContentType\FieldDefinition([
150150
'identifier' => self::FIELD_DEFINITION_IDENTIFIER,
151-
'fieldTypeIdentifier' => 'ezcontentquery',
151+
'fieldTypeIdentifier' => 'ibexa_content_query',
152152
'fieldSettings' => [
153153
'ReturnedType' => 'folder',
154154
'QueryType' => self::QUERY_TYPE_IDENTIFIER,

src/bundle/DependencyInjection/Compiler/ConfigurableFieldDefinitionMapperPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function process(ContainerBuilder $container): void
2828
if (!is_array($parameter)) {
2929
return;
3030
}
31-
$parameter['ezcontentquery'] = [
31+
$parameter['ibexa_content_query'] = [
3232
'definition_type' => 'QueryFieldDefinition',
3333
'value_resolver' => 'resolver("QueryFieldValue", [field, content])',
3434
];

src/bundle/DependencyInjection/IbexaFieldTypeQueryExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected function prependTwigConfig(ContainerBuilder $container): void
6363
{
6464
$views = Yaml::parseFile(__DIR__ . '/../Resources/config/default_parameters.yaml')['parameters'];
6565
$twigGlobals = [
66-
'ezContentQueryViews' => [
66+
'ibexaContentQueryViews' => [
6767
'field' => $views['ibexa.field_type.query.content.view.field'],
6868
'item' => $views['ibexa.field_type.query.content.view.item'],
6969
],
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
parameters:
22
ibexa.field_type.query.content.view.field: 'content_query_field'
33
ibexa.field_type.query.content.view.item: 'line'
4-
ibexa.field_type.query.content.identifier: 'ezcontentquery'
4+
ibexa.field_type.query.content.identifier: 'ibexa_content_query'
5+
ibexa.field_type.query.content.legacy_identifier: 'ezcontentquery'

src/bundle/Resources/config/services/ezplatform.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
autowire: true
1111
autoconfigure: false
1212
tags:
13-
- { name: ibexa.field_type, alias: '%ibexa.field_type.query.content.identifier%' }
13+
- { name: ibexa.field_type, alias: '%ibexa.field_type.query.content.identifier%', legacy_alias: '%ibexa.field_type.query.content.legacy_identifier%' }
1414
arguments:
1515
$queryTypeRegistry: '@Ibexa\Core\QueryType\ArrayQueryTypeRegistry'
1616
$identifier: '%ibexa.field_type.query.content.identifier%'

src/bundle/Resources/translations/ibexa_fielddefinition.en.xliff

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
77
</header>
88
<body>
9-
<trans-unit id="63bb25b1f9154e4a451f0940afacd58edd948f45" resname="ezcontentquery.no_defined_query_types">
9+
<trans-unit id="63bb25b1f9154e4a451f0940afacd58edd948f45" resname="ibexa_content_query.no_defined_query_types">
1010
<source>There are no query types defined</source>
1111
<target state="new">There are no query types defined</target>
12-
<note>key: ezcontentquery.no_defined_query_types</note>
12+
<note>key: ibexa_content_query.no_defined_query_types</note>
1313
</trans-unit>
14-
<trans-unit id="95e9fc9f8e314bbd35a18372cd7888be0a1ec1e0" resname="ezcontentquery.query_type.label">
14+
<trans-unit id="95e9fc9f8e314bbd35a18372cd7888be0a1ec1e0" resname="ibexa_content_query.query_type.label">
1515
<source>Query type:</source>
1616
<target state="new">Query type:</target>
17-
<note>key: ezcontentquery.query_type.label</note>
17+
<note>key: ibexa_content_query.query_type.label</note>
1818
</trans-unit>
1919
</body>
2020
</file>

src/bundle/Resources/translations/ibexa_fieldtypes.en.xliff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
77
</header>
88
<body>
9-
<trans-unit id="c4d6ec2588a701ed1c113080b07918e3452b628b" resname="ezcontentquery.name">
9+
<trans-unit id="c4d6ec2588a701ed1c113080b07918e3452b628b" resname="ibexa_content_query.name">
1010
<source>Content query</source>
1111
<target state="new">Content query</target>
12-
<note>key: ezcontentquery.name</note>
12+
<note>key: ibexa_content_query.name</note>
1313
</trans-unit>
1414
</body>
1515
</file>

src/bundle/Resources/views/fieldtype/field_view.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{% extends '@IbexaCore/content_fields.html.twig' %}
22

3-
{% block ezcontentquery_field %}
3+
{% block ibexa_content_query_field %}
44
{{ render(controller(
55
"ibexa_content::viewAction",
66
{
77
"content": content,
88
"location": location ?? null,
99
"queryFieldDefinitionIdentifier": field.fieldDefIdentifier,
10-
"viewType": ezContentQueryViews['field'],
11-
"itemViewType": itemViewType|default(ezContentQueryViews['item']),
10+
"viewType": ibexaContentQueryViews['field'],
11+
"itemViewType": itemViewType|default(ibexaContentQueryViews['item']),
1212
"enablePagination": parameters.enablePagination|default(false),
1313
"disablePagination": parameters.disablePagination|default(false),
1414
"itemsPerPage": parameters.itemsPerPage|default(false)

src/bundle/Resources/views/fieldtype/fielddefinition_edit.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% block ezcontentquery_field_definition_edit %}
1+
{% block ibexa_content_query_field_definition_edit %}
22
<div class="query-query-type{% if group_class is not empty %} {{ group_class }}{% endif %}">
33
{{- form_label(form.QueryType) -}}
44
{{- form_widget(form.QueryType) -}}

0 commit comments

Comments
 (0)