Rob Review GDPR Consent#10
Conversation
This is now in line with the D8 version of this module.
The long description is now hidden with javascript.
These are notes for staff to put their rationale for why they have done this for auditors.
By switching to entity_ui_get_form page callback.
…into feature/d7/gdpr_consent
Turned out that a message entity already has a $message->user property.
| 'unsigned' => TRUE, | ||
| 'not null' => FALSE, | ||
| 'default' => NULL, | ||
| 'description' => "The {users}.uid of the associated user.", |
There was a problem hiding this comment.
What user is this? How is the user associated?
| ), | ||
| ), | ||
| 'primary key' => array('id'), | ||
| 'unique key' => array('name'), |
There was a problem hiding this comment.
Should be 'unique keys'.
You can also put revision_id in as a unique key.
| 'primary key' => array('id'), | ||
| 'unique key' => array('name'), | ||
| 'indexes' => array( | ||
| 'name' => array('name'), |
There was a problem hiding this comment.
Doesn't need to be declared separately as it's already declared unique.
| 'unsigned' => TRUE, | ||
| 'not null' => FALSE, | ||
| 'default' => NULL, | ||
| 'description' => 'The ID of the attached entity.', |
| 'unsigned' => TRUE, | ||
| 'not null' => FALSE, | ||
| 'default' => NULL, | ||
| 'description' => "The {users}.uid of the associated user.", |
There was a problem hiding this comment.
"Associated user"? Is this a revision-ed version of the field on the entity base table? Or supposed to be the creator of this revision? Or both?
|
|
||
| foreach ($items as $delta => $item) { | ||
| if (!empty($item['target_id'])) { | ||
| if (!$valid) { |
There was a problem hiding this comment.
I don't understand what this is doing? $valid is always TRUE in this function.
| } | ||
|
|
||
| foreach ($fields as $field) { | ||
| if (!empty($values = $form_state['values'][$field])) { |
There was a problem hiding this comment.
This isn't supported by all the versions of PHP that drupal supposedly supports. empty can only have variables in it.
if ($values = $from_state['values'][$field]) {Would be better.
| /** | ||
| * {@inheritdoc} | ||
| */ | ||
| public function identifier() { |
There was a problem hiding this comment.
This seems superfluous. Why is this being added?
| * Provides a user consent field type. | ||
| */ | ||
| function gdpr_consent_field_info() { | ||
| return array( |
There was a problem hiding this comment.
Lets add a property info callback so that wrappers can be used to access consent information
|
|
||
| $build['long_description'] = array( | ||
| '#type' => 'markup', | ||
| '#markup' => $entity->long_description, |
No description provided.