Skip to content

Commit

Permalink
Fixed deprecated ibexa_content controller references (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwojs authored Apr 14, 2022
1 parent dc64ed7 commit 18bfb74
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/bundle/Core/Resources/config/routing/internal.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ibexa.content.translation.view:
path: /view/content/{contentId}/{viewType}/{layout}/translation/{languageCode}/{locationId}
defaults:
_controller: ibexa_content:viewAction
_controller: ibexa_content::viewAction
viewType: full
locationId: null
layout: true
Expand All @@ -11,7 +11,7 @@ ibexa.content.translation.view:
ibexa.content.view:
path: /view/content/{contentId}/{viewType}/{layout}/{locationId}
defaults:
_controller: ibexa_content:viewAction
_controller: ibexa_content::viewAction
viewType: full
locationId: null
layout: true
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Core/Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ services:
- { name: controller.service_arguments }

# This alias allows easier management for subrequests
# {{ render( controller( "ibexa_content:viewAction", {"contentId": 12, "locationId": 123, "viewType": "line"} ) ) }
# {{ render( controller( "ibexa_content::viewAction", {"contentId": 12, "locationId": 123, "viewType": "line"} ) ) }
ibexa_content:
public: true
alias: Ibexa\Core\MVC\Symfony\Controller\Content\ViewController
Expand Down
4 changes: 2 additions & 2 deletions src/bundle/Core/Resources/views/content_fields.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
{% for contentId in field.value.destinationContentIds %}
{% if parameters.available[contentId] %}
<li>
{{ render( controller( "ibexa_content:viewAction", {'contentId': contentId, 'viewType': 'embed', 'layout': false} ) ) }}
{{ render( controller( "ibexa_content::viewAction", {'contentId': contentId, 'viewType': 'embed', 'layout': false} ) ) }}
</li>{% endif %}
{% endfor %}
</ul>
Expand Down Expand Up @@ -477,7 +477,7 @@
{% apply spaceless %}
{% if not ibexa_field_is_empty( content, field ) and parameters.available %}
<div {{ block( 'field_attributes' ) }}>
{{ render( controller( "ibexa_content:viewAction", {'contentId': field.value.destinationContentId, 'viewType': 'text_linked', 'layout': false} ) ) }}
{{ render( controller( "ibexa_content::viewAction", {'contentId': field.value.destinationContentId, 'viewType': 'text_linked', 'layout': false} ) ) }}
</div>
{% endif %}
{% endapply %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@
<div class="ibexa-fielddefinition-setting-name">{{ 'fielddefinition.selection-root.label'|trans|desc("Selection root:")}}</div>
<div class="ibexa-fielddefinition-setting-value">
{% if rootLocationId %}
{{ render( controller( "ibexa_content:viewAction", {'locationId': rootLocationId, 'viewType': 'line', 'layout': false} ), {'strategy': 'esi'}) }}
{{ render( controller( "ibexa_content::viewAction", {'locationId': rootLocationId, 'viewType': 'line', 'layout': false} ), {'strategy': 'esi'}) }}
{% else %}
<em>{{ 'fielddefinition.selection-root.undefined'|trans|desc("No defined root")}}</em>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ protected function getForwardRequest(Location $location, Content $content, SiteA

if ($this->controllerChecker->usesCustomController($content, $location)) {
$forwardRequestParameters = [
'_controller' => 'ibexa_content:viewAction',
'_controller' => 'ibexa_content::viewAction',
'_route' => self::CONTENT_VIEW_ROUTE,
] + $forwardRequestParameters;
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/MVC/Symfony/Routing/UrlAliasRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class UrlAliasRouter implements ChainedRouterInterface, RequestMatcherInterface
{
public const URL_ALIAS_ROUTE_NAME = 'ibexa.url.alias';

public const VIEW_ACTION = 'ibexa_content:viewAction';
public const VIEW_ACTION = 'ibexa_content::viewAction';

/** @var \Symfony\Component\Routing\RequestContext */
protected $requestContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function addToRegistry(array $viewBuilders)
/**
* Returns the ViewBuilder that matches the given controller string.
*
* @param string $controllerString A controller string to match against. Example: ibexa_content:viewAction.
* @param string $controllerString A controller string to match against. Example: ibexa_content::viewAction.
*
* @return \Ibexa\Core\MVC\Symfony\View\Builder\ViewBuilder|null
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function testGetControllerMatchedView()

$this->request->attributes->add(
[
'_controller' => 'ibexa_content:viewAction',
'_controller' => 'ibexa_content::viewAction',
'contentId' => $contentId,
'locationId' => $locationId,
'viewType' => $viewType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ protected function getDuplicatedRequest(Location $location, Content $content, Si
$duplicatedRequest = new Request();
$duplicatedRequest->attributes->add(
[
'_controller' => 'ibexa_content:viewAction',
'_controller' => 'ibexa_content::viewAction',
'contentId' => $content->id,
'location' => $location,
'viewType' => ViewManagerInterface::VIEW_TYPE_FULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ public function testBuildView(): void

$parameters = [
'viewType' => 'full',
'_controller' => 'ibexa_content:viewAction',
'_controller' => 'ibexa_content::viewAction',
'locationId' => 2,
];

Expand Down

0 comments on commit 18bfb74

Please # to comment.