Introduce config entity for managing GDPR settings.#7
Open
JeremySkinner wants to merge 19 commits intofeatures/consentfrom
Open
Introduce config entity for managing GDPR settings.#7JeremySkinner wants to merge 19 commits intofeatures/consentfrom
JeremySkinner wants to merge 19 commits intofeatures/consentfrom
Conversation
…ith missing method on versions older than 8.5
yanniboi
reviewed
Apr 13, 2018
| */ | ||
| public static function create(array $array) { | ||
| $field = new GdprField($array['bundle'], $array['name']); | ||
| $field->rtf = $array['rtf']; |
Contributor
There was a problem hiding this comment.
Lets call $array $values instead, and use new static($values['bundle'] ... ) as we don't need to explicitly name the class in a static method.
Contributor
There was a problem hiding this comment.
Did you push the branch? 😛
Author
There was a problem hiding this comment.
Yes, I pushed develop. I'll merge it to here too.
yanniboi
reviewed
Apr 13, 2018
| */ | ||
| public function setField($bundle, $field_name, $enabled, $rta, $rtf, $sanitizer, $notes) { | ||
| $this->bundles[$bundle][$field_name] = [ | ||
| 'bundle' => $bundle, |
Contributor
There was a problem hiding this comment.
I think this could be more generic. rather than having to pass every field in as a separate parameter. $bundle and $field_name are still good to force as they are necessary for any update.
public function setField($bundle, $field_name, $values) {
$values['bundle'] = $bundle;
$values['name'] = $field_name;
foreach ($values as $key => $value) {
$this->bundles[$bundle][$field_name][$key] = $value;
}
This way we can pass anything in with values, either less than all fields or add more fields without having to change the function.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces a config entity for storing GDPR field settings with a separate form which resolves the issues with base fields not being editable.
Clicking the edit link next to the field on the GDPR field list page takes you to a separate page where the settings can be modified:
For editable fields, GDPR settings can still be edited through the field settings form, as before.