File tree 2 files changed +8
-4
lines changed
templates/Entity/_content-entity/src/Entity
tests/functional/Generator/Entity/_content_entity/_yes/src/Entity
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ use Drupal\Core\Field\BaseFieldDefinition;
23
23
use Drupal\Core\Entity\ContentEntityBase ;
24
24
{% endif % }
25
25
{% if revisionable % }
26
- use Drupal\Core\Entity\RevisionableContentEntityBase ;
26
+ use Drupal\Core\Entity\EditorialContentEntityBase ;
27
27
use Drupal\Core\Entity\Form\RevisionDeleteForm ;
28
28
use Drupal\Core\Entity\Form\RevisionRevertForm ;
29
29
use Drupal\Core\Entity\Routing\RevisionHtmlRouteProvider ;
@@ -68,6 +68,9 @@ use Drupal\{{ machine_name }}\{{ class }}AccessControlHandler;
68
68
' label' => ' {{ label_base_field ? ' label ' : ' id ' }}' ,
69
69
{% if author_base_field % }
70
70
' owner' => ' uid' ,
71
+ {% endif % }
72
+ {% if status_base_field % }
73
+ ' published' => ' status' ,
71
74
{% endif % }
72
75
' uuid' => ' uuid' ,
73
76
],
@@ -159,7 +162,7 @@ use Drupal\{{ machine_name }}\{{ class }}AccessControlHandler;
159
162
],
160
163
{% endif % }
161
164
)]
162
- final class {{ class }} extends {% if revisionable % }Revisionable {% endif % }ContentEntityBase implements {{ class }}Interface {
165
+ class {{ class }} extends {% if revisionable % }Editorial {% endif % }ContentEntityBase implements {{ class }}Interface {
163
166
164
167
{% if changed_base_field or author_base_field % }
165
168
{% if changed_base_field % }
Original file line number Diff line number Diff line change 12
12
use Drupal \Core \Entity \Form \DeleteMultipleForm ;
13
13
use Drupal \Core \Entity \Form \RevisionDeleteForm ;
14
14
use Drupal \Core \Entity \Form \RevisionRevertForm ;
15
- use Drupal \Core \Entity \RevisionableContentEntityBase ;
15
+ use Drupal \Core \Entity \EditorialContentEntityBase ;
16
16
use Drupal \Core \Entity \Routing \AdminHtmlRouteProvider ;
17
17
use Drupal \Core \Entity \Routing \RevisionHtmlRouteProvider ;
18
18
use Drupal \Core \Field \BaseFieldDefinition ;
40
40
'bundle ' => 'bundle ' ,
41
41
'label ' => 'label ' ,
42
42
'owner ' => 'uid ' ,
43
+ 'published ' => 'status ' ,
43
44
'uuid ' => 'uuid ' ,
44
45
],
45
46
handlers: [
92
93
'revision_log_message ' => 'revision_log ' ,
93
94
],
94
95
)]
95
- final class FooExample extends RevisionableContentEntityBase implements FooExampleInterface {
96
+ class FooExample extends EditorialContentEntityBase implements FooExampleInterface {
96
97
97
98
use EntityChangedTrait;
98
99
use EntityOwnerTrait;
You can’t perform that action at this time.
0 commit comments