public BaseFieldDefinition::setCustomStorage($custom_storage)
Sets the storage behavior for this field.
bool $custom_storage: Pass FALSE if the storage takes care of storing the field, TRUE otherwise.
$this
\LogicException Thrown if custom storage is to be set to FALSE for a computed field.
public function setCustomStorage($custom_storage) { if (!$custom_storage && $this->isComputed()) { throw new \LogicException("Entity storage cannot store a computed field."); } $this->definition['custom_storage'] = $custom_storage; return $this; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Field!BaseFieldDefinition.php/function/BaseFieldDefinition::setCustomStorage/8.1.x