buildPermissions($type); } return $perms; } /** * Returns a list of entity test permissions for a given entity test bundle. * * @param \Drupal\entity_test\Entity\EntityTestBundle $type * The entity test bundle. * * @return array * An associative array of permission names and descriptions. */ protected function buildPermissions(EntityTestBundle $type) { $type_id = $type->id(); $type_params = ['%type_name' => $type->label()]; return [ "create $type_id entity_test_with_bundle entities" => [ 'title' => $this->t('%type_name: Create new entity', $type_params), ], ]; } }