public function GdprField::__construct in General Data Protection Regulation 8
Same name and namespace in other branches
- 8.2 modules/gdpr_fields/src/Entity/GdprField.php \Drupal\gdpr_fields\Entity\GdprField::__construct()
- 3.0.x modules/gdpr_fields/src/Entity/GdprField.php \Drupal\gdpr_fields\Entity\GdprField::__construct()
GdprField constructor.
Parameters
array $values: Underlying data values for the field.
File
- modules/
gdpr_fields/ src/ Entity/ GdprField.php, line 111
Class
- GdprField
- Metadata for a GDPR field.
Namespace
Drupal\gdpr_fields\EntityCode
public function __construct(array $values = []) {
$this->bundle = $values['bundle'];
$this->name = $values['name'];
$this->entityTypeId = $values['entity_type_id'];
$this->rtf = array_key_exists('rtf', $values) ? $values['rtf'] : 'no';
$this->rta = array_key_exists('rta', $values) ? $values['rta'] : 'no';
$this->enabled = array_key_exists('enabled', $values) ? $values['enabled'] : FALSE;
$this->anonymizer = array_key_exists('anonymizer', $values) ? $values['anonymizer'] : NULL;
$this->notes = array_key_exists('notes', $values) ? $values['notes'] : '';
$this->relationship = array_key_exists('relationship', $values) ? $values['relationship'] : self::RELATIONSHIP_DISABLED;
$this->sarsFilename = array_key_exists('sars_filename', $values) ? $values['sars_filename'] : '';
}