Skip to content

Commit

Permalink
Deep link for reference article field types
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Apr 28, 2020
1 parent 84a9dad commit 22bc526
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions Content/ArticleDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ protected function getConfigurationBuilder(): BuilderInterface
]
);

// for sulu versions < 2.1 the enableView does not exist
if (method_exists($builder, 'enableView')) {
$builder->enableView(ArticleAdmin::EDIT_FORM_VIEW, ['id' => 'id']);
}
Expand Down
13 changes: 13 additions & 0 deletions DependencyInjection/SuluArticleExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Sulu\Bundle\ArticleBundle\DependencyInjection;

use Sulu\Bundle\ArticleBundle\Admin\ArticleAdmin;
use Sulu\Bundle\ArticleBundle\Document\ArticleDocument;
use Sulu\Bundle\ArticleBundle\Document\ArticlePageDocument;
use Sulu\Bundle\ArticleBundle\Document\Form\ArticleDocumentType;
Expand Down Expand Up @@ -200,6 +201,12 @@ public function prepend(ContainerBuilder $container)
'article_selection' => [
'default_type' => 'list_overlay',
'resource_key' => 'articles',
'view' => [
'name' => ArticleAdmin::EDIT_FORM_VIEW,
'result_to_view' => [
'id' => 'id',
],
],
'types' => [
'list_overlay' => [
'adapter' => 'table',
Expand All @@ -216,6 +223,12 @@ public function prepend(ContainerBuilder $container)
'single_article_selection' => [
'default_type' => 'list_overlay',
'resource_key' => 'articles',
'view' => [
'name' => ArticleAdmin::EDIT_FORM_VIEW,
'result_to_view' => [
'id' => 'id',
],
],
'types' => [
'list_overlay' => [
'adapter' => 'table',
Expand Down

0 comments on commit 22bc526

Please sign in to comment.