function PasswordItem::propertyDefinitions
Same name in other branches
- 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/PasswordItem.php \Drupal\Core\Field\Plugin\Field\FieldType\PasswordItem::propertyDefinitions()
- 8.9.x core/lib/Drupal/Core/Field/Plugin/Field/FieldType/PasswordItem.php \Drupal\Core\Field\Plugin\Field\FieldType\PasswordItem::propertyDefinitions()
- 10 core/lib/Drupal/Core/Field/Plugin/Field/FieldType/PasswordItem.php \Drupal\Core\Field\Plugin\Field\FieldType\PasswordItem::propertyDefinitions()
Overrides StringItemBase::propertyDefinitions
File
-
core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldType/ PasswordItem.php, line 25
Class
- PasswordItem
- Defines the 'password' entity field type.
Namespace
Drupal\Core\Field\Plugin\Field\FieldTypeCode
public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
$properties['value'] = DataDefinition::create('string')->setLabel(new TranslatableMarkup('The hashed password'))
->setSetting('case_sensitive', TRUE);
$properties['existing'] = DataDefinition::create('string')->setLabel(new TranslatableMarkup('Existing password'));
$properties['pre_hashed'] = DataDefinition::create('boolean')->setLabel(new TranslatableMarkup('Determines if a password needs hashing'));
return $properties;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.