-
Notifications
You must be signed in to change notification settings - Fork 142
カスタムコンテンツ草稿プレビュー機能実装 #4191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
カスタムコンテンツ草稿プレビュー機能実装 #4191
Changes from all commits
01016b5
270d55b
5e06d3a
91df0f6
0098658
1800d36
80dc63b
bb3298e
c600461
1a8231a
b72cb6f
cd0838b
43c69bb
14d53f6
825b33f
d67b662
1158b71
3667267
49bfa9a
ca5597d
6d0daca
4f5a0ca
3318207
91c655b
17a2bd1
03ba255
aeb235a
db3c9d0
bc41974
2c7aa24
966f1ca
8173fcb
7a2845f
237b823
87c1bb9
516085b
49d0dac
d1daa19
d15607d
531bbc2
ba65dfa
5306770
b3ab1d7
1c8ad94
217800c
0596965
d9b18f7
e95d5f5
80a0462
662aca4
8740cd9
737fa80
b17a9b9
7846b3a
7b0d8cd
376a816
ae46063
123c6d1
3407c1a
15e7111
c25abd4
db0d822
dc495e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -371,6 +371,18 @@ public function setupPreviewForView(Controller $controller): void | |
| BcUtil::onEvent($customEntriesTable->getEventManager(), 'Model.beforeMarshal', $events); | ||
|
|
||
| $entity = $customEntriesTable->decodeRow($entity); | ||
|
|
||
| if ($request->getQuery('preview') === 'draft') { | ||
| $customFields = $customEntriesTable->links; | ||
| foreach ($customFields as $customField) { | ||
| if ($customField->custom_field->type !== 'CuCcBurgerEditor') { | ||
| continue; | ||
| } | ||
| $name = $customField->name; | ||
| $entity->$name = $entity->detail_draft; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| } | ||
| } | ||
|
|
||
| $controller->set(['customEntry' => $entity]); | ||
|
|
||
| // テンプレートの変更 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
== を === に変更お願いします