Skip to content

Commit 1c980c1

Browse files
timplunkettjmolivas
authored andcommitted
Replace deprecated urlInfo() with toUrl() (#3000)
1 parent 963fc31 commit 1c980c1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

templates/module/src/Form/entity.php.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@ class {{ entity_class }}Form extends EntityForm {% endblock %}
7070
'%label' => ${{ entity_name | machine_name }}->label(),
7171
]));
7272
}
73-
$form_state->setRedirectUrl(${{ entity_name | machine_name }}->urlInfo('collection'));
73+
$form_state->setRedirectUrl(${{ entity_name | machine_name }}->toUrl('collection'));
7474
}
7575
{% endblock %}

templates/module/src/Plugin/Field/FieldFormatter/imageformatter.php.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class {{ class_name }} extends ImageFormatterBase implements ContainerFactoryPlu
177177
if ($image_link_setting == 'content') {
178178
$entity = $items->getEntity();
179179
if (!$entity->isNew()) {
180-
$url = $entity->urlInfo();
180+
$url = $entity->toUrl();
181181
}
182182
}
183183
elseif ($image_link_setting == 'file') {

0 commit comments

Comments
 (0)