Skip to content

Commit 78236ff

Browse files
authored
IBX-8805: Dropped deprecated Twig Functions&Filters (#450)
* IBX-8805: Dropped deprecated Twig Functions&Filters * dropped old fixtures
1 parent 0c5f86c commit 78236ff

31 files changed

+2
-992
lines changed

src/bundle/Core/Resources/views/content_fields.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# - \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo contentInfo the contentInfo to which the field belongs to
66
# - \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo versionInfo the versionInfo to which the field belongs to
77
# - mixed fieldSettings settings of the field (depends on the fieldtype)
8-
# - array parameters options passed to ez_render_field under the parameters key
8+
# - array parameters options passed to ibexa_render_field under the parameters key
99
# - array attr the attributes to add the generate HTML, contains at least a "class" entry
1010
# containing <fieldtypeidentifier>-field
1111
#}

src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -62,50 +62,18 @@ public function __construct(
6262
public function getFunctions()
6363
{
6464
return [
65-
new TwigFunction(
66-
'ez_content_name',
67-
[$this, 'getTranslatedContentName'],
68-
[
69-
'deprecated' => '4.0',
70-
'alternative' => 'ibexa_content_name',
71-
]
72-
),
7365
new TwigFunction(
7466
'ibexa_content_name',
7567
[$this, 'getTranslatedContentName']
7668
),
77-
new TwigFunction(
78-
'ez_field_value',
79-
[$this, 'getTranslatedFieldValue'],
80-
[
81-
'deprecated' => '4.0',
82-
'alternative' => 'ibexa_field_value',
83-
]
84-
),
8569
new TwigFunction(
8670
'ibexa_field_value',
8771
[$this, 'getTranslatedFieldValue']
8872
),
89-
new TwigFunction(
90-
'ez_field',
91-
[$this, 'getTranslatedField'],
92-
[
93-
'deprecated' => '4.0',
94-
'alternative' => 'ibexa_field',
95-
]
96-
),
9773
new TwigFunction(
9874
'ibexa_field',
9975
[$this, 'getTranslatedField']
10076
),
101-
new TwigFunction(
102-
'ez_field_is_empty',
103-
[$this, 'isFieldEmpty'],
104-
[
105-
'deprecated' => '4.0',
106-
'alternative' => 'ibexa_field_is_empty',
107-
]
108-
),
10977
new TwigFunction(
11078
'ibexa_has_field',
11179
[$this, 'hasField']
@@ -114,26 +82,10 @@ public function getFunctions()
11482
'ibexa_field_is_empty',
11583
[$this, 'isFieldEmpty']
11684
),
117-
new TwigFunction(
118-
'ez_field_name',
119-
[$this, 'getTranslatedFieldDefinitionName'],
120-
[
121-
'deprecated' => '4.0',
122-
'alternative' => 'ibexa_field_name',
123-
]
124-
),
12585
new TwigFunction(
12686
'ibexa_field_name',
12787
[$this, 'getTranslatedFieldDefinitionName']
12888
),
129-
new TwigFunction(
130-
'ez_field_description',
131-
[$this, 'getTranslatedFieldDefinitionDescription'],
132-
[
133-
'deprecated' => '4.0',
134-
'alternative' => 'ibexa_field_description',
135-
]
136-
),
13789
new TwigFunction(
13890
'ibexa_field_description',
13991
[$this, 'getTranslatedFieldDefinitionDescription']
@@ -142,14 +94,6 @@ public function getFunctions()
14294
'ibexa_field_group_name',
14395
[$this, 'getFieldGroupName']
14496
),
145-
new TwigFunction(
146-
'ez_content_field_identifier_first_filled_image',
147-
[$this, 'getFirstFilledImageFieldIdentifier'],
148-
[
149-
'deprecated' => '4.0',
150-
'alternative' => 'ibexa_content_field_identifier_first_filled_image',
151-
]
152-
),
15397
new TwigFunction(
15498
'ibexa_content_field_identifier_first_filled_image',
15599
[$this, 'getFirstFilledImageFieldIdentifier']

src/lib/MVC/Symfony/Templating/Twig/Extension/DataAttributesExtension.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,6 @@ class DataAttributesExtension extends AbstractExtension
2424
public function getFilters(): array
2525
{
2626
return [
27-
new TwigFilter(
28-
'ez_data_attributes_serialize',
29-
[$this, 'serializeDataAttributes'],
30-
[
31-
'is_safe' => ['html'],
32-
'deprecated' => '4.0',
33-
'alternative' => 'ibexa_data_attributes_serialize',
34-
]
35-
),
3627
new TwigFilter(
3728
'ibexa_data_attributes_serialize',
3829
[$this, 'serializeDataAttributes'],

src/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtension.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -64,31 +64,11 @@ public function getFunctions()
6464
};
6565

6666
return [
67-
new TwigFunction(
68-
'ez_render_field',
69-
$renderFieldCallable,
70-
[
71-
'is_safe' => ['html'],
72-
'needs_environment' => true,
73-
'deprecated' => '4.0',
74-
'alternative' => 'ibexa_render_field',
75-
]
76-
),
7767
new TwigFunction(
7868
'ibexa_render_field',
7969
$renderFieldCallable,
8070
['is_safe' => ['html'], 'needs_environment' => true]
8171
),
82-
new TwigFunction(
83-
'ez_render_field_definition_settings',
84-
$renderFieldDefinitionSettingsCallable,
85-
[
86-
'is_safe' => ['html'],
87-
'needs_environment' => true,
88-
'deprecated' => '4.0',
89-
'alternative' => 'ibexa_render_field_definition_settings',
90-
]
91-
),
9272
new TwigFunction(
9373
'ibexa_render_field_definition_settings',
9474
$renderFieldDefinitionSettingsCallable,

src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,6 @@ private function getLocale()
7575
public function getFilters()
7676
{
7777
return [
78-
new TwigFilter(
79-
'ez_file_size',
80-
[$this, 'sizeFilter'],
81-
[
82-
'deprecated' => '4.0',
83-
'alternative' => 'ibexa_file_size',
84-
]
85-
),
8678
new TwigFilter(
8779
'ibexa_file_size',
8880
[$this, 'sizeFilter']

src/lib/MVC/Symfony/Templating/Twig/Extension/ImageExtension.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,11 @@ public function __construct(VariationHandler $imageVariationService, AssetMapper
3434
public function getFunctions()
3535
{
3636
return [
37-
new TwigFunction(
38-
'ez_image_alias',
39-
[$this, 'getImageVariation'],
40-
[
41-
'is_safe' => ['html'],
42-
'deprecated' => '4.0',
43-
'alternative' => 'ibexa_image_alias',
44-
]
45-
),
4637
new TwigFunction(
4738
'ibexa_image_alias',
4839
[$this, 'getImageVariation'],
4940
['is_safe' => ['html']]
5041
),
51-
new TwigFunction(
52-
'ez_content_field_identifier_image_asset',
53-
[$this, 'getImageAssetContentFieldIdentifier'],
54-
[
55-
'is_safe' => ['html'],
56-
'deprecated' => '4.0',
57-
'alternative' => 'ibexa_content_field_identifier_image_asset',
58-
]
59-
),
6042
new TwigFunction(
6143
'ibexa_content_field_identifier_image_asset',
6244
[$this, 'getImageAssetContentFieldIdentifier'],

src/lib/MVC/Symfony/Templating/Twig/Extension/QueryRenderingExtension.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,29 +46,11 @@ public function getFunctions(): array
4646
};
4747

4848
return [
49-
new TwigFunction(
50-
'ez_render_*_query',
51-
$typeCallable,
52-
[
53-
'is_safe' => ['html'],
54-
'deprecated' => '4.0',
55-
'alternative' => 'ibexa_render_*_query',
56-
]
57-
),
5849
new TwigFunction(
5950
'ibexa_render_*_query',
6051
$typeCallable,
6152
['is_safe' => ['html']]
6253
),
63-
new TwigFunction(
64-
'ez_render_*_query_*',
65-
$typeAndRendererCallable,
66-
[
67-
'is_safe' => ['html'],
68-
'deprecated' => '4.0',
69-
'alternative' => 'ibexa_render_*_query_',
70-
]
71-
),
7254
new TwigFunction(
7355
'ibexa_render_*_query_*',
7456
$typeAndRendererCallable,

src/lib/MVC/Symfony/Templating/Twig/Extension/RenderContentExtension.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,6 @@ public function __construct(
3838
public function getFunctions(): array
3939
{
4040
return [
41-
new TwigFunction(
42-
'ez_render_content',
43-
[$this, 'renderContent'],
44-
[
45-
'is_safe' => ['html'],
46-
'deprecated' => '4.0',
47-
'alternative' => 'ibexa_render_content',
48-
]
49-
),
5041
new TwigFunction(
5142
'ibexa_render_content',
5243
[$this, 'renderContent'],

src/lib/MVC/Symfony/Templating/Twig/Extension/RenderExtension.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,6 @@ public function __construct(
3939
public function getFunctions(): array
4040
{
4141
return [
42-
new TwigFunction(
43-
'ez_render',
44-
[$this, 'render'],
45-
[
46-
'is_safe' => ['html'],
47-
'deprecated' => '4.0',
48-
'alternative' => 'ibexa_render',
49-
]
50-
),
5142
new TwigFunction(
5243
'ibexa_render',
5344
[$this, 'render'],

src/lib/MVC/Symfony/Templating/Twig/Extension/RenderLocationExtension.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,6 @@ public function __construct(
3838
public function getFunctions(): array
3939
{
4040
return [
41-
new TwigFunction(
42-
'ez_render_location',
43-
[$this, 'renderLocation'],
44-
[
45-
'is_safe' => ['html'],
46-
'deprecated' => '4.0',
47-
'alternative' => 'ibexa_render_location',
48-
]
49-
),
5041
new TwigFunction(
5142
'ibexa_render_location',
5243
[$this, 'renderLocation'],

0 commit comments

Comments
 (0)