Overrides \Drupal\block\BlockBase::blockForm().
Adds body and description fields to the block configuration form.
Overrides BlockBase::blockForm
public function blockForm($form, &$form_state) {
$options = array();
$view_modes = entity_get_view_modes('custom_block');
foreach ($view_modes as $view_mode => $detail) {
$options[$view_mode] = $detail['label'];
}
$form['custom_block']['view_mode'] = array(
'#type' => 'select',
'#options' => $options,
'#title' => t('View mode'),
'#description' => t('Output the block in this view mode.'),
'#default_value' => $this->configuration['view_mode'],
);
$form['title']['#description'] = t('The title of the block as shown to the user.');
return $form;
}