public function TextItemBase::applyDefaultValue in Zircon Profile 8.0
Same name and namespace in other branches
- 8 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
\Drupal\Core\TypedData\TypedDataInterface Returns itself to allow for chaining.
Overrides Map::applyDefaultValue
File
- core/
modules/ text/ src/ Plugin/ Field/ FieldType/ TextItemBase.php, line 45 - Contains \Drupal\text\Plugin\Field\FieldType\TextItemBase.
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(array(
'format' => NULL,
), $notify);
return $this;
}