public function EntityAdapter::applyDefaultValue in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php \Drupal\Core\Entity\Plugin\DataType\EntityAdapter::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 TypedData::applyDefaultValue
File
- core/
lib/ Drupal/ Core/ Entity/ Plugin/ DataType/ EntityAdapter.php, line 163 - Contains \Drupal\Core\Entity\Plugin\DataType\EntityAdapter.
Class
- EntityAdapter
- Defines the "entity" data type.
Namespace
Drupal\Core\Entity\Plugin\DataTypeCode
public function applyDefaultValue($notify = TRUE) {
// Apply the default value of all properties.
foreach ($this
->getProperties() as $property) {
$property
->applyDefaultValue(FALSE);
}
return $this;
}