I like the idea of using an empty string by default as opposed to NULL.
Good find on the interface documentation.
As for #40.6, I was not sure why the markup was needed but without it the rows would not render properly. Now I'm thinking it may have been the NULLs. If not, no idea.
#40.9, it's definitely skirting the issue. We'll need to find out how to have it come up as not changed.
core/tests/fixtures/config_install/multilingual.tar.gz
needs to be updated. This is the cause for some of the test fails.
Still looking into how to fix the other errors caused by the configuration difference.
+++ b/core/modules/user/src/RoleListBuilder.php
@@ -72,6 +73,9 @@ public function buildHeader() {
+ $row['description'] = [
+ '#markup' => $entity->getDescription(),
+ ];
This is the only thing I don't like. I am not sure why it does not work without the markup.
Thank you for catching the group tag. : )
I'm unsure why the tests failed like that, I'll give it another look.
This only adds new features and most cases where someone has overridden the roles entity they would be using this as a base already. But you are correct, this could be pushed to 10.0 in that case.
Addressed all issues I outlined in #26.
Added tests for the description functions as well as the RoleListBuilder.
-
+++ b/core/modules/user/config/install/user.role.anonymous.yml @@ -3,6 +3,7 @@ status: true +description: '' +++ b/core/modules/user/config/install/user.role.authenticated.yml @@ -3,6 +3,7 @@ status: true +description: ''
We could probably provide these with descriptions, for completeness.
-
+++ b/core/modules/user/src/RoleForm.php @@ -12,6 +12,13 @@ + /** + * Role. + * + * @var \Drupal\user\RoleInterface + */ + protected $entity;
Poor naming choice / comment description.
Edit: Not needed at all. This is declared in the parent class.
-
+++ b/core/modules/user/src/RoleListBuilder.php @@ -64,6 +64,7 @@ public function getFormId() { + $header['description'] = t('Description');
Utilise
$this->t
within classes.
Tests need to be added for this issue.