function BlockContentTypeForm::copyFormValuesToEntity
Same name in other branches
- 11.x core/modules/block_content/src/BlockContentTypeForm.php \Drupal\block_content\BlockContentTypeForm::copyFormValuesToEntity()
Overrides EntityForm::copyFormValuesToEntity
File
-
core/
modules/ block_content/ src/ BlockContentTypeForm.php, line 98
Class
- BlockContentTypeForm
- The block content type entity form.
Namespace
Drupal\block_contentCode
protected function copyFormValuesToEntity(EntityInterface $entity, array $form, FormStateInterface $form_state) {
// An empty description violates config schema.
if (trim($form_state->getValue('description', '')) === '') {
$form_state->unsetValue('description');
}
parent::copyFormValuesToEntity($entity, $form, $form_state);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.