public function TextItemBase::applyDefaultValue in Drupal 8
Same name and namespace in other branches
- 9 core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php \Drupal\text\Plugin\Field\FieldType\TextItemBase::applyDefaultValue()
- 10 core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php \Drupal\text\Plugin\Field\FieldType\TextItemBase::applyDefaultValue()
Applies the default value.
Parameters
bool $notify: (optional) Whether to notify the parent object of the change. Defaults to TRUE. If a property is updated from a parent object, set it to FALSE to avoid being notified again.
Return value
$this Returns itself to allow for chaining.
Overrides Map::applyDefaultValue
File
- core/
modules/ text/ src/ Plugin/ Field/ FieldType/ TextItemBase.php, line 41
Class
- TextItemBase
- Base class for 'text' configurable field types.
Namespace
Drupal\text\Plugin\Field\FieldTypeCode
public function applyDefaultValue($notify = TRUE) {
// @todo: Add in the filter default format here.
$this
->setValue([
'format' => NULL,
], $notify);
return $this;
}