public function BlockFieldForm::getProperties in Display Suite 8.2
Same name and namespace in other branches
- 8.4 src/Form/BlockFieldForm.php \Drupal\ds\Form\BlockFieldForm::getProperties()
- 8.3 src/Form/BlockFieldForm.php \Drupal\ds\Form\BlockFieldForm::getProperties()
Returns the properties for the custom field.
Overrides FieldFormBase::getProperties
File
- src/
Form/ BlockFieldForm.php, line 65
Class
- BlockFieldForm
- Configure block fields.
Namespace
Drupal\ds\FormCode
public function getProperties(FormStateInterface $form_state) {
$properties['block'] = $form_state
->getValue('block');
// Preserve existing block config.
$field_key = $form_state
->getValue('id');
$field = $this
->config('ds.field.' . $field_key)
->get();
if (isset($field['properties']) && $field['properties']['block'] == $properties['block']) {
$properties = $field['properties'];
}
// Save title checkbox.
$properties['use_block_title'] = $form_state
->getValue('use_block_title');
return $properties;
}