File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
templates/Entity/_content-entity/src/Entity
tests/functional/Generator/Entity/_content_entity/_yes/src/Entity Expand file tree Collapse file tree 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;
2323use Drupal\Core\Entity\ContentEntityBase ;
2424 {% endif % }
2525 {% if revisionable % }
26- use Drupal\Core\Entity\RevisionableContentEntityBase ;
26+ use Drupal\Core\Entity\EditorialContentEntityBase ;
2727use Drupal\Core\Entity\Form\RevisionDeleteForm ;
2828use Drupal\Core\Entity\Form\RevisionRevertForm ;
2929use Drupal\Core\Entity\Routing\RevisionHtmlRouteProvider ;
@@ -68,6 +68,9 @@ use Drupal\{{ machine_name }}\{{ class }}AccessControlHandler;
6868 ' label' => ' {{ label_base_field ? ' label ' : ' id ' }}' ,
6969{% if author_base_field % }
7070 ' owner' => ' uid' ,
71+ {% endif % }
72+ {% if status_base_field % }
73+ ' published' => ' status' ,
7174{% endif % }
7275 ' uuid' => ' uuid' ,
7376 ],
@@ -159,7 +162,7 @@ use Drupal\{{ machine_name }}\{{ class }}AccessControlHandler;
159162 ],
160163{% endif % }
161164)]
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 {
163166
164167{% if changed_base_field or author_base_field % }
165168 {% if changed_base_field % }
Original file line number Diff line number Diff line change 1212use Drupal \Core \Entity \Form \DeleteMultipleForm ;
1313use Drupal \Core \Entity \Form \RevisionDeleteForm ;
1414use Drupal \Core \Entity \Form \RevisionRevertForm ;
15- use Drupal \Core \Entity \RevisionableContentEntityBase ;
15+ use Drupal \Core \Entity \EditorialContentEntityBase ;
1616use Drupal \Core \Entity \Routing \AdminHtmlRouteProvider ;
1717use Drupal \Core \Entity \Routing \RevisionHtmlRouteProvider ;
1818use Drupal \Core \Field \BaseFieldDefinition ;
4040 'bundle ' => 'bundle ' ,
4141 'label ' => 'label ' ,
4242 'owner ' => 'uid ' ,
43+ 'published ' => 'status ' ,
4344 'uuid ' => 'uuid ' ,
4445 ],
4546 handlers: [
9293 'revision_log_message ' => 'revision_log ' ,
9394 ],
9495)]
95- final class FooExample extends RevisionableContentEntityBase implements FooExampleInterface {
96+ class FooExample extends EditorialContentEntityBase implements FooExampleInterface {
9697
9798 use EntityChangedTrait;
9899 use EntityOwnerTrait;
You can’t perform that action at this time.
0 commit comments