public function PasswordField::__unset in Password Field 8
Unsets the variable.
Overrides FieldItemBase::__unset
File
- src/
Plugin/ Field/ FieldType/ PasswordField.php, line 53
Class
- PasswordField
- Provides a field type of Password.
Namespace
Drupal\password_field\Plugin\Field\FieldTypeCode
public function __unset($value) {
$str = $this
->get('value')
->getValue();
$val = password_field_encrypt_decrypt('encrypt', $str);
$this
->set('value', $val);
}