Skip to content

Commit 20f7370

Browse files
gilbertomangonesenzolutions
authored andcommitted
Fix generate:entity:content installing module (#4155)
1 parent 37aeb5d commit 20f7370

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

templates/module/src/entity-content-bundle-permissions.php.twig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Drupal\{{ module }};
1111

1212
{% block use_class %}
1313
use Drupal\Core\StringTranslation\StringTranslationTrait;
14-
use Drupal\{{ module }}\Entity\{{ entity_class }}Type;
14+
use Drupal\{{ module }}\Entity\{{ entity_class }};
1515

1616
{% endblock %}
1717

@@ -37,7 +37,7 @@ class {{ entity_class }}Permissions{% endblock %}
3737
public function generatePermissions() {
3838
$perms = [];
3939

40-
foreach ({{ entity_class }}Type::loadMultiple() as $type) {
40+
foreach ({{ entity_class }}::loadMultiple() as $type) {
4141
$perms += $this->buildPermissions($type);
4242
}
4343

@@ -47,13 +47,13 @@ class {{ entity_class }}Permissions{% endblock %}
4747
/**
4848
* Returns a list of node permissions for a given node type.
4949
*
50-
* @param \Drupal\{{ module }}\Entity\{{ entity_class }}Type $type
50+
* @param \Drupal\{{ module }}\Entity\{{ entity_class }} $type
5151
* The {{ entity_class }} type.
5252
*
5353
* @return array
5454
* An associative array of permission names and descriptions.
5555
*/
56-
protected function buildPermissions({{ entity_class}}Type $type) {
56+
protected function buildPermissions({{ entity_class}} $type) {
5757
$type_id = $type->id();
5858
$type_params = ['%type_name' => $type->label()];
5959

0 commit comments

Comments
 (0)