function ContentEntityBase::setDefaultTranslationEnforced
Same name in other branches
- 10 core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::setDefaultTranslationEnforced()
Set or clear an override of the isDefaultTranslation() result.
Parameters
bool|null $enforce_default_translation: If boolean value is passed, the value will override the result of isDefaultTranslation() method. If NULL is passed, the default logic will be used.
Return value
$this
File
-
core/
lib/ Drupal/ Core/ Entity/ ContentEntityBase.php, line 434
Class
- ContentEntityBase
- Implements Entity Field API specific enhancements to the Entity class.
Namespace
Drupal\Core\EntityCode
public function setDefaultTranslationEnforced(?bool $enforce_default_translation) : static {
$this->enforceDefaultTranslation = $enforce_default_translation;
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.