Skip to content
Snippets Groups Projects

Resolve "Error caused by display format"

Merged Konstantinos Platis requested to merge 5-error-caused-by-display-format into dev
2 files
+ 40
23
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -33,14 +33,34 @@ class HorizontalBoxes extends DefaultStyle
@@ -33,14 +33,34 @@ class HorizontalBoxes extends DefaultStyle
protected $usesoptions = true;
protected $usesoptions = true;
protected $renderFields = true;
protected $renderFields = true;
 
/**
 
* Defines the initial options of the Horizontal Boxes.
 
*
 
* @return mixed
 
*/
protected function defineOptions(){
protected function defineOptions(){
$options = parent::defineOptions();
$options = parent::defineOptions();
$options['row_class'] = 'horizontal-boxes-row';
$options['row_class'] = array('default'=> 'horizontal-boxes-row') ;
$options['default_row_class'] = 'horizontal-boxes-row';
return $options;
return $options;
}
}
}
/**
\ No newline at end of file
* Overrides the options form of HB
 
*
 
* @param $form
 
* @param FormStateInterface $form_state
 
*/
 
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
 
parent::buildOptionsForm($form, $form_state);
 
 
$form['row_class'] = array(
 
'#type' => 'textfield',
 
'#title' => t('Row Class'),
 
'#default_value' => (isset($this->options['row_class'])) ? $this->options['row_class'] : 'horizontal-boxes-row',
 
);
 
}
 
 
 
}
 
\ No newline at end of file
Loading