public function display_settings($data = array()) { $settings = $this->get_settings(); $field = array('label' => 'Email Intervals', 'id' => 'email_intervals', 'type' => 'matrix', 'description' => 'Define as many intervals as you like. If the abandoned cart is older than the defined interval, an email will be sent.', 'settings' => array('columns' => array(array('name' => 'weeks', 'title' => 'Weeks'), array('name' => 'days', 'title' => 'Days'), array('name' => 'hours', 'title' => 'Hours'), array('name' => 'minutes', 'title' => 'Minutes')), 'attributes' => postmaster_table_attr())); return InterfaceBuilder::field('email_intervals', $field, $settings, array('dataArray' => TRUE, 'varName' => 'setting[cartthrob_abandoned_cart]'))->display_field(); }
static function fieldset($fields, $data, $legend = FALSE, $properties = array(), $attributes = array()) { $IB = new InterfaceBuilder(array_merge($properties, array('data' => $data))); $IB->addFields($fields); return $IB->buildFieldset($legend, $attributes); }
/** * Build the settings table with InterfaceBuilder * * @access public * @param array The global settings array * @return string */ public function build_table($settings, $fields = FALSE) { if ($fields) { $this->fields = $fields; } if (count($this->fields) == 0) { return NULL; } $settings = $this->get_settings($settings); $params = array('varName' => 'setting[' . $this->get_name() . ']', 'dataArray' => TRUE); return InterfaceBuilder::table($this->fields, $settings, $params, postmaster_table_attr()); }