Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
entity_draft
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
entity_draft
Commits
6e994b94
Commit
6e994b94
authored
3 years ago
by
git
Committed by
Bruno de Oliveira Magalhaes
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2914250
by rvillan: Type property does not exist on all entity types
parent
ac55302c
Branches
Branches containing commit
Tags
2.0.5
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
entity_draft.module
+3
-2
3 additions, 2 deletions
entity_draft.module
with
3 additions
and
2 deletions
entity_draft.module
+
3
−
2
View file @
6e994b94
...
...
@@ -276,7 +276,8 @@ function entity_draft_entity_type_submit(array &$form, FormStateInterface $form_
// Set required handling using controlled_fields.
$config_entity_type
=
$entity
->
getEntityType
();
$bundle_of
=
$config_entity_type
->
getBundleOf
();
$field_definitions
=
controlled_fields_fetch_field_definitions
(
$bundle_of
,
$entity
->
get
(
'type'
));
$bundle
=
$entity
->
id
();
$field_definitions
=
controlled_fields_fetch_field_definitions
(
$bundle_of
,
$bundle
);
$entity_manager
=
\Drupal
::
entityTypeManager
();
$entity_display_repository
=
\Drupal
::
service
(
'entity_display.repository'
);
...
...
@@ -292,7 +293,7 @@ function entity_draft_entity_type_submit(array &$form, FormStateInterface $form_
}
foreach
(
$valid_form_modes
as
$form_mode_id
)
{
controlled_fields_enable_form_display
(
$bundle_of
,
$
entity
->
get
(
'type'
)
,
$form_mode_id
,
$form_state
->
getValue
(
'enable_draft'
));
controlled_fields_enable_form_display
(
$bundle_of
,
$
bundle
,
$form_mode_id
,
$form_state
->
getValue
(
'enable_draft'
));
}
controlled_fields_field_config_change_required
(
$field_definitions
,
$form_state
->
getValue
(
'enable_draft'
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment