public function setup($title, $description, $fields, $classname = '')
{
// require title
if (!$title) {
Incorrect_Syntax_Exception::raise('Enter widget title');
}
// add custom fields
$this->add_fields($fields);
# Generate Widget ID
$widget_ID = 'carbon_' . preg_replace('~\\s+~', '_', strtolower(trim(preg_replace('/[^a-zA-Z0-9]+/u', '', remove_accents($title)))));
# Generate Classes
if (!is_array($classname)) {
$classname = (array) $classname;
}
$classname[] = $widget_ID;
$classname = implode(' ', $classname);
$widget_options = compact('description', 'classname', 'widget_ID');
$this->verify_unique_widget_id($widget_ID);
parent::__construct($widget_ID, $title, $widget_options, $this->form_options);
}