示例#1
0
 public function __construct()
 {
     $this->_table = '@__htmltype';
     $this->_id = 'id';
     $this->_alias = 'toe_htmlt';
     $this->_addField('id', 'hidden', 'int', 0, langCsp::_('ID'))->_addField('label', 'text', 'varchar', 0, langCsp::_('Method'), 32)->_addField('description', 'text', 'varchar', 0, langCsp::_('Description'), 255);
 }
示例#2
0
 public function addMetaBox()
 {
     global $post;
     if ($post->post_status != 'publish' && frameCsp::_()->getModule('options')->get('sub_enable')) {
         add_meta_box('cspSubscribeMetaBox', langCsp::_('Coming Soon - Subscribe notifications'), array($this->getController()->getView(), 'getMetaBox'));
     }
 }
 public function __construct()
 {
     $this->_table = '@__options_categories';
     $this->_id = 'id';
     $this->_alias = 'toe_opt_cats';
     $this->_addField('id', 'hidden', 'int', 0, langCsp::_('ID'))->_addField('label', 'text', 'varchar', 0, langCsp::_('Method'), 128);
 }
 public function __construct()
 {
     $this->_table = '@__email_templates';
     $this->_id = 'id';
     $this->_alias = 'toe_etpl';
     $this->_addField('label', 'text', 'varchar', '', langCsp::_('Label'), 128, '', '', langCsp::_('Template label'))->_addField('subject', 'textarea', 'varchar', '', langCsp::_('Subject'), 255, '', '', langCsp::_('E-mail Subject'))->_addField('body', 'textarea', 'text', '', langCsp::_('Body'), '', '', '', langCsp::_('E-mail Body'))->_addField('variables', 'block', 'text', '', langCsp::_('Variables'), '', '', '', langCsp::_('Template variables. They can be used in the body and subject'))->_addField('active', 'checkbox', 'tinyint', 0, langCsp::_('Active'), '', '', '', langCsp::_('If checked the notifications will be sent to receiver'))->_addField('name', 'hidden', 'varchar', '', '', 128)->_addField('moduleCsp', 'hidden', 'varchar', '', '', 128);
 }
示例#5
0
 public function __construct()
 {
     $this->_table = '@__files';
     $this->_id = 'id';
     $this->_alias = 'toe_f';
     $this->_addField('pid', 'hidden', 'int', '', langCsp::_('Product ID'))->_addField('name', 'text', 'varchar', '255', langCsp::_('File name'))->_addField('path', 'hidden', 'text', '', langCsp::_('Real Path To File'))->_addField('mime_type', 'text', 'varchar', '32', langCsp::_('Mime Type'))->_addField('size', 'text', 'int', 0, langCsp::_('File Size'))->_addField('active', 'checkbox', 'tinyint', 0, langCsp::_('Active Download'))->_addField('date', 'text', 'datetime', '', langCsp::_('Upload Date'))->_addField('download_limit', 'text', 'int', '', langCsp::_('Download Limit'))->_addField('period_limit', 'text', 'int', '', langCsp::_('Period Limit'))->_addField('description', 'textarea', 'text', 0, langCsp::_('Descritpion'))->_addField('type_id', 'text', 'int', '', langCsp::_('Type ID'));
 }
示例#6
0
 public function __construct()
 {
     $this->_table = '@__subscribers';
     $this->_id = 'id';
     $this->_alias = 'toe_subscr';
     $this->_addField('user_id', 'text', 'int', '', langCsp::_('User Id'), 11, '', '', langCsp::_('User Id'))->_addField('email', 'text', 'varchar', '', langCsp::_('User E-mail'), 255, '', '', langCsp::_('Subscriber E-mail'))->_addField('name', 'text', 'varchar', 0, langCsp::_('User Name'), 255, '', '', langCsp::_('User Name If User Is Registered'))->_addField('created', 'text', 'datetime', '', langCsp::_('Subscription Date'), '', '', '', langCsp::_('Date Of Subscription'))->_addField('active', 'checkbox', 'tinyint', '', langCsp::_('Active Subscription'), 4, '', '', langCsp::_('If Is Not Checked user will not get any newsletters'))->_addField('token', 'hidden', 'varchar', '', langCsp::_('Token'), 255, '', '', '')->_addField('ip', 'hidden', 'varchar', '', langCsp::_('IP address'), 64, '', '', '');
 }
示例#7
0
 public function initMenu()
 {
     $mainSlug = dispatcherCsp::applyFilters('adminMenuMainSlug', $this->_mainSlug);
     $mainMenuPageOptions = array('page_title' => langCsp::_('Ready! Coming Soon'), 'menu_title' => langCsp::_('Ready! Coming Soon'), 'capability' => 'manage_options', 'menu_slug' => $mainSlug, 'function' => array(frameCsp::_()->getModule('options')->getView(), 'getAdminPage'));
     $mainMenuPageOptions = dispatcherCsp::applyFilters('adminMenuMainOption', $mainMenuPageOptions);
     add_menu_page($mainMenuPageOptions['page_title'], $mainMenuPageOptions['menu_title'], $mainMenuPageOptions['capability'], $mainMenuPageOptions['menu_slug'], $mainMenuPageOptions['function']);
 }
示例#8
0
 public function __construct()
 {
     $this->_table = '@__options';
     $this->_id = 'id';
     /*Let's associate it with posts*/
     $this->_alias = 'toe_opt';
     $this->_addField('id', 'text', 'int', 0, langCsp::_('ID'))->_addField('code', 'text', 'varchar', '', langCsp::_('Code'), 64)->_addField('value', 'text', 'varchar', '', langCsp::_('Value'), 134217728)->_addField('label', 'text', 'varchar', '', langCsp::_('Label'), 255)->_addField('description', 'text', 'text', '', langCsp::_('Description'))->_addField('htmltype_id', 'selectbox', 'text', '', langCsp::_('Type'))->_addField('cat_id', 'hidden', 'int', '', langCsp::_('Category ID'))->_addField('sort_order', 'hidden', 'int', '', langCsp::_('Sort Order'))->_addField('value_type', 'hidden', 'varchar', '', langCsp::_('Value Type'));
 }
示例#9
0
 public function __construct()
 {
     $this->_table = '@__modules';
     $this->_id = 'id';
     /*Let's associate it with posts*/
     $this->_alias = 'toe_m';
     $this->_addField('label', 'text', 'varchar', 0, langCsp::_('Label'), 128)->_addField('type_id', 'selectbox', 'smallint', 0, langCsp::_('Type'))->_addField('active', 'checkbox', 'tinyint', 0, langCsp::_('Active'))->_addField('params', 'textarea', 'text', 0, langCsp::_('Params'))->_addField('has_tab', 'checkbox', 'tinyint', 0, langCsp::_('Has Tab'))->_addField('description', 'textarea', 'text', 0, langCsp::_('Description'), 128)->_addField('code', 'hidden', 'varchar', '', langCsp::_('Code'), 64)->_addField('ex_plug_dir', 'hidden', 'varchar', '', langCsp::_('External plugin directory'), 255);
 }
示例#10
0
 public function __construct()
 {
     $this->_table = '@__modules_type';
     $this->_id = 'id';
     /*Let's associate it with posts*/
     $this->_alias = 'toe_m_t';
     $this->_addField($this->_id, 'text', 'int', '', langCsp::_('ID'))->_addField('label', 'text', 'varchar', '', langCsp::_('Label'), 128);
 }
示例#11
0
 public function __construct()
 {
     $this->_table = '@__log';
     $this->_id = 'id';
     /*Let's associate it with posts*/
     $this->_alias = 'toe_log';
     $this->_addField('id', 'text', 'int', 0, langCsp::_('ID'), 11)->_addField('type', 'text', 'varchar', '', langCsp::_('Type'), 64)->_addField('data', 'text', 'text', '', langCsp::_('Data'))->_addField('date_created', 'text', 'int', '', langCsp::_('Date created'))->_addField('uid', 'text', 'int', 0, langCsp::_('User ID'))->_addField('oid', 'text', 'int', 0, langCsp::_('Order ID'));
 }
示例#12
0
 public function __construct()
 {
     $this->_table = '@__access';
     $this->_id = 'id';
     /*Let's associate it with posts*/
     $this->_alias = 'toe_acc';
     $this->_addField('id', 'text', 'int', 0, langCsp::_('ID'))->_addField('access', 'text', 'varchar', '', langCsp::_('Access'), 64)->_addField('type_access', 'text', 'tinyint', '', langCsp::_('Type_access'), 1);
 }
示例#13
0
 public function init()
 {
     $isAdminPlugPage = frameCsp::_()->isAdminPlugPage();
     $isPluginsPage = utilsCsp::isPluginsPage();
     if (is_admin()) {
         if ($isAdminPlugPage || $isPluginsPage) {
             frameCsp::_()->addScript('jquery');
             frameCsp::_()->addScript('jquery-ui-tabs', '', array('jquery'));
             frameCsp::_()->addScript('jquery-ui-dialog', '', array('jquery'));
             frameCsp::_()->addScript('jquery-ui-button', '', array('jquery'));
             frameCsp::_()->addScript('farbtastic');
             frameCsp::_()->addScript('commonCsp', CSP_JS_PATH . 'common.js');
             frameCsp::_()->addScript('coreCsp', CSP_JS_PATH . 'core.js');
             frameCsp::_()->addScript('adminOptionsCsp', CSP_JS_PATH . 'admin.options.js');
             frameCsp::_()->addScript('ajaxupload', CSP_JS_PATH . 'ajaxupload.js');
             frameCsp::_()->addScript('postbox', get_bloginfo('wpurl') . '/wp-admin/js/postbox.js');
             add_thickbox();
             $ajaxurl = admin_url('admin-ajax.php');
             if (frameCsp::_()->getModule('options')->get('ssl_on_ajax')) {
                 $ajaxurl = uriCsp::makeHttps($ajaxurl);
             }
             $jsData = array('siteUrl' => CSP_SITE_URL, 'imgPath' => CSP_IMG_PATH, 'cssPath' => CSP_CSS_PATH, 'loader' => CSP_LOADER_IMG, 'close' => CSP_IMG_PATH . 'cross.gif', 'ajaxurl' => $ajaxurl, 'animationSpeed' => frameCsp::_()->getModule('options')->get('js_animation_speed'), 'siteLang' => langCsp::getData(), 'options' => frameCsp::_()->getModule('options')->getAllowedPublicOptions(), 'CSP_CODE' => CSP_CODE, 'ball_loader' => CSP_IMG_PATH . 'ajax-loader-ball.gif', 'ok_icon' => CSP_IMG_PATH . 'ok-icon.png');
             $jsData['allCheckRegPlugs'] = modInstallerCsp::getCheckRegPlugs();
             $jsData = dispatcherCsp::applyFilters('jsInitVariables', $jsData);
             frameCsp::_()->addJSVar('coreCsp', 'CSP_DATA', $jsData);
             $this->_styles = array('styleCsp' => array('path' => CSP_CSS_PATH . 'style.css'), 'adminStylesCsp' => array('path' => CSP_CSS_PATH . 'adminStyles.css'), 'jquery-tabs' => array('path' => CSP_CSS_PATH . 'jquery-tabs.css'), 'jquery-buttons' => array('path' => CSP_CSS_PATH . 'jquery-buttons.css'), 'wp-jquery-ui-dialog' => array(), 'farbtastic' => array(), 'jquery-dialog' => array('path' => CSP_CSS_PATH . 'jquery-dialog.css'));
             $defaultPlugTheme = frameCsp::_()->getModule('options')->get('default_theme');
             foreach ($this->_styles as $s => $sInfo) {
                 if (isset($sInfo['for'])) {
                     if ($sInfo['for'] == 'frontend' && is_admin() || $sInfo['for'] == 'admin' && !is_admin()) {
                         continue;
                     }
                 }
                 $canBeSubstituted = true;
                 if (isset($sInfo['substituteFor'])) {
                     switch ($sInfo['substituteFor']) {
                         case 'frontend':
                             $canBeSubstituted = !is_admin();
                             break;
                         case 'admin':
                             $canBeSubstituted = is_admin();
                             break;
                     }
                 }
                 if ($canBeSubstituted && file_exists(CSP_TEMPLATES_DIR . $defaultPlugTheme . DS . $s . '.css')) {
                     frameCsp::_()->addStyle($s, CSP_TEMPLATES_PATH . $defaultPlugTheme . '/' . $s . '.css');
                 } elseif ($canBeSubstituted && file_exists(utilsCsp::getCurrentWPThemeDir() . 'csp' . DS . $s . '.css')) {
                     frameCsp::_()->addStyle($s, utilsCsp::getCurrentWPThemePath() . '/toe/' . $s . '.css');
                 } elseif (!empty($sInfo['path'])) {
                     frameCsp::_()->addStyle($s, $sInfo['path']);
                 } else {
                     frameCsp::_()->addStyle($s);
                 }
             }
         }
     }
     parent::init();
 }
示例#14
0
 /**
  * Returns the available tabs
  * 
  * @return array of tab 
  */
 public function getTabs()
 {
     $tabs = array();
     $tab = new tabCsp(langCsp::_('General'), $this->getCode());
     $tab->setView('optionTab');
     $tab->setSortOrder(-99);
     $tabs[] = $tab;
     return $tabs;
 }
示例#15
0
 public function recreatePages()
 {
     $res = new responseCsp();
     if ($this->getModel()->recreatePages()) {
         $res->addMessage(langCsp::_('Pages was recreated'));
     } else {
         $res->pushError($this->getModel()->getErrors());
     }
     $res->ajaxExec();
 }
示例#16
0
 public function syncWithEngine()
 {
     $res = new responseCsp();
     if (($syncMsg = $this->getModel()->syncWithEngine(reqCsp::get('post'))) !== false) {
         $res->addMessage(empty($syncMsg) ? langCsp::_('Done') : $syncMsg);
     } else {
         $res->pushError($this->getModel()->getErrors());
     }
     return $res->ajaxExec();
 }
示例#17
0
 public function getPasswordRecoverConfirm()
 {
     $errors = array();
     if (!$this->_passwordResetSuccess) {
         $errors[] = langCsp::_('Password Reset Error');
     }
     $this->_passwordResetSuccess = false;
     $this->assign('errorsCsp', $errors);
     return parent::getContent('passwordRecoverConfirm');
 }
示例#18
0
 /**
  * Returns the available tabs
  * 
  * @return array of tab 
  */
 public function getTabs()
 {
     $tabs = array();
     $tab = new tabCsp(langCsp::_('User Fields'), $this->getCode());
     $tab->setView('userFieldsTab');
     $tab->setSortOrder(3);
     $tab->setParent('templatesCsp');
     $tab->setNestingLevel(1);
     $tabs[] = $tab;
     return $tabs;
 }
示例#19
0
 public function saveRole()
 {
     $res = new responseCsp();
     if (($roleRetData = $this->getModel()->saveRole(reqCsp::get('post'))) !== false) {
         $res->addMessage(langCsp::_('Role change'));
         //$res->addData($roleRetData);
     } else {
         $res->pushError($this->getModel('access')->getErrors());
     }
     return $res->ajaxExec();
 }
 public function install()
 {
     parent::install();
     frameCsp::_()->getTable('options')->insert(array('code' => $this->getCode() . '_enabled', 'value' => '', 'label' => langCsp::_($this->getLabel() . ' Enabled'), 'cat_id' => 2));
     // unused for now
     /*frameCsp::_()->getTable('options')->insert(array(
     			'code' => $this->getCode(). '_auto_subscriber_create',
     			'value' => '1',
     			'label' => langCsp::_($this->getLabel(). ' Auto subscribers create'),
     			'cat_id' => 2,
     		));*/
     frameCsp::_()->getTable('options')->insert(array('code' => $this->getCode() . '_is_main', 'value' => '', 'label' => langCsp::_($this->getLabel() . ' is Main'), 'cat_id' => 2));
 }
示例#21
0
 public function adminTextEditorPopup()
 {
     $shortcodes = frameCsp::_()->getModule('shortcodesCsp')->getCodes();
     $shortcodesSelectOptions = array('' => langCsp::_('Select'));
     foreach ($shortcodes as $code => $cinfo) {
         if (in_array($code, array('product', 'category'))) {
             continue;
         }
         $shortcodesSelectOptions[$code] = $code;
     }
     $this->assign('shortcodesCsp', $shortcodes);
     $this->assign('shortcodesSelectOptions', $shortcodesSelectOptions);
     return parent::getContent('adminTextEditorPopup');
 }
示例#22
0
 public function deleteElement($post = array())
 {
     $returnDelElement = array();
     foreach ($post['arrElement'] as $el) {
         if (!frameCsp::_()->getTable('access')->delete($el)) {
             $this->pushError(langCsp::_('Element ' . $el . ' is not removed'));
         } else {
             $returnDelElement[] = $el;
         }
     }
     if ($this->haveErrors()) {
         return false;
     }
     return $returnDelElement;
 }
示例#23
0
 public function welcomePageSaveInfo()
 {
     $res = new responseCsp();
     installerCsp::setUsed();
     if ($this->getModel()->welcomePageSaveInfo(reqCsp::get('get'))) {
         $res->addMessage(langCsp::_('Information was saved. Thank you!'));
     } else {
         $res->pushError($this->getModel()->getErrors());
     }
     $originalPage = reqCsp::getVar('original_page');
     $returnArr = explode('|', $originalPage);
     $return = $this->getModule()->decodeSlug(str_replace('return=', '', $returnArr[1]));
     $return = admin_url(strpos($return, '?') ? $return : 'admin.php?page=' . $return);
     redirect($return);
     //return $res->ajaxExec();
 }
示例#24
0
 public function sendMailToDevelopers()
 {
     $res = new responseCsp();
     $data = reqCsp::get('post');
     $fields = array('name' => new fieldCspCsp('name', langCsp::_('Your name field is required.'), '', '', 'Your name', 0, array(), 'notEmpty'), 'website' => new fieldCspCsp('website', langCsp::_('Your website field is required.'), '', '', 'Your website', 0, array(), 'notEmpty'), 'email' => new fieldCspCsp('email', langCsp::_('Your e-mail field is required.'), '', '', 'Your e-mail', 0, array(), 'notEmpty, email'), 'subject' => new fieldCspCsp('subject', langCsp::_('Subject field is required.'), '', '', 'Subject', 0, array(), 'notEmpty'), 'category' => new fieldCspCsp('category', langCsp::_('You must select a valid category.'), '', '', 'Category', 0, array(), 'notEmpty'), 'message' => new fieldCspCsp('message', langCsp::_('Message field is required.'), '', '', 'Message', 0, array(), 'notEmpty'));
     foreach ($fields as $f) {
         $f->setValue($data[$f->name]);
         $errors = validatorCsp::validate($f);
         if (!empty($errors)) {
             $res->addError($errors);
         }
     }
     if (!$res->error) {
         $msg = 'Message from: ' . get_bloginfo('name') . ', Host: ' . $_SERVER['HTTP_HOST'] . '<br />';
         foreach ($fields as $f) {
             $msg .= '<b>' . $f->label . '</b>: ' . nl2br($f->value) . '<br />';
         }
         $headers[] = 'From: ' . $fields['name']->value . ' <' . $fields['email']->value . '>';
         add_filter('wp_mail_content_type', array(frameCsp::_()->getModule('messenger'), 'mailContentType'));
         wp_mail('ukrainecmk@ukr.net, simon@readyshoppingcart.com, support@readyecommerce.zendesk.com', 'Ready Ecommerce Contact Dev', $msg, $headers);
         $res->addMessage(langCsp::_('Done'));
     }
     $res->ajaxExec();
 }
示例#25
0
 public function activateUpdate()
 {
     $res = new responseCsp();
     if ($this->getModel('modules')->activateUpdate(reqCsp::get('post'))) {
         $res->addMessage(langCsp::_('Very good! Now plugin will be updated.'));
     } else {
         $res->pushError($this->getModel('modules')->getErrors());
     }
     return $res->ajaxExec();
 }
示例#26
0
 public static function activate($modDataArr)
 {
     $locations = self::_getPluginLocations();
     if ($modules = self::_getModulesFromXml($locations['xmlPath'])) {
         foreach ($modules as $m) {
             $modDataArr = utilsCsp::xmlNodeAttrsToArr($m);
             if (!frameCsp::_()->moduleActive($modDataArr['code'])) {
                 //If module is not active - then acivate it
                 if (frameCsp::_()->getModule('options')->getModel('modules')->put(array('code' => $modDataArr['code'], 'active' => 1))->error) {
                     errorsCsp::push(langCsp::_('Error Activating module'), errorsCsp::MOD_INSTALL);
                 } else {
                     // For some reason - activation tables didn't worked here
                     /*if(isset($modDataArr['code'])) {
                     			// Retrive ex_plug_dir data from database
                     			$dbModData = frameCsp::_()->getModule('options')->getModel('modules')->get(array('code' => $modDataArr['code']));
                     			if(!empty($dbModData) && !empty($dbModData[0])) {
                     				$modDataArr['ex_plug_dir'] = $dbModData[0]['ex_plug_dir'];
                     				// Run tables activation (updates) if required
                     				
                     				self::_installTables($modDataArr, 'activate');
                     			}
                     		}*/
                 }
             }
         }
     }
 }
示例#27
0
 public function __call($name, $arguments)
 {
     $controller = $this->getController();
     if (method_exists($controller, $name)) {
         //try to find this method in controller
         return $this->getController()->{$name}(isset($arguments[0]) ? $arguments[0] : NULL, isset($arguments[0]) ? $arguments[0] : NULL, isset($arguments[0]) ? $arguments[0] : NULL);
     } elseif ($controller) {
         //try to find this method in model
         $model = $controller->getModel();
         if (method_exists($model, $name)) {
             return $this->getController()->{$name}(isset($arguments[0]) ? $arguments[0] : NULL, isset($arguments[0]) ? $arguments[0] : NULL, isset($arguments[0]) ? $arguments[0] : NULL);
         }
     }
     errorsCsp::push(langCsp::_(array('Module', $this->_code, 'method', $name, 'undefined')), errorsCsp::FATAL);
 }
示例#28
0
<form id="cspAdminAccessFormRole">
<table>
  <tr>
    <td>Only users at or above this level will be able to log in:</td>
    <td>
    	<?php 
$selected = frameCsp::_()->getTable('access')->get('access', array('type_access' => 3));
?>
		<?php 
echo htmlCsp::selectbox('roleCsp', array('attrs' => 'style="float:left; width:120px; margin-right:8px;"', 'options' => $this->selectRole, 'value' => $selected[0]['access']));
?>
        <?php 
echo htmlCsp::hidden('reqType', array('value' => 'ajax'));
?>
		<?php 
echo htmlCsp::hidden('page', array('value' => 'access'));
?>
		<?php 
echo htmlCsp::hidden('action', array('value' => 'saveRole'));
?>
        <?php 
echo htmlCsp::submit('submitRole', array('value' => langCsp::_('Save'), 'attrs' => 'class="button button-primary button-large" style="float:right;"'));
?>
        
    </td>
  </tr>
</table>
</form>
示例#29
0
?>
"><?php 
langCsp::_e('Twitter Title');
?>
:</label>
<?php 
echo htmlCsp::text($this->widget->get_field_name('title'), array('attrs' => 'id="' . $this->widget->get_field_id('title') . '"', 'value' => $this->data['title']));
?>
<br />
<label for="<?php 
echo $this->widget->get_field_id('username');
?>
"><?php 
langCsp::_e('Twitter Username');
?>
:</label>
<?php 
echo htmlCsp::text($this->widget->get_field_name('username'), array('attrs' => 'id="' . $this->widget->get_field_id('username') . '"', 'value' => $this->data['username']));
?>
<br />
<label for="<?php 
echo $this->widget->get_field_id('count');
?>
"><?php 
langCsp::_e('Tweets Count');
?>
:</label>
<?php 
echo htmlCsp::text($this->widget->get_field_name('count'), array('attrs' => 'id="' . $this->widget->get_field_id('count') . '"', 'value' => $this->data['count']));
?>
<br />
示例#30
0
 /**
  * Displays the config options for given module
  * 
  * @param string $module 
  * @param array $addDefaultOptions - if you want to add some additionsl options - specify it here
  */
 public function drawConfig($module, $additionalOptions = array())
 {
     if (!frameCsp::_()->getModule($module)) {
         return false;
     }
     // check for xml file with params structure
     if (frameCsp::_()->getModule($module)->isExternal()) {
         $config_xml = frameCsp::_()->getModule($module)->getModDir() . 'mod.xml';
     } else {
         $config_xml = CSP_MODULES_DIR . $module . DS . 'mod.xml';
     }
     if (!file_exists($config_xml)) {
         // if there is no configuration file for this $module
         return langCsp::_('There are no configuration options for this module');
     }
     $output = '';
     // reading params structure
     $configOptions = $this->prepareConfigOptions($config_xml);
     // reading params from database
     //bugodel2nia..............
     if (is_string($this->value)) {
         $params = Utils::jsonDecode($this->value);
     } elseif (is_object($this->value) || is_array($this->value)) {
         $params = toeObjectToArray($this->value);
     }
     //if (!empty($params)) {
     if (!empty($configOptions)) {
         $i = 0;
         if (empty($params)) {
             $params = array('0' => array());
         }
         if (is_array($additionalOptions) && !empty($additionalOptions)) {
             $configOptions = array_merge($configOptions, $additionalOptions);
         }
         foreach ($params as $param) {
             $output .= '<div class="module_options">';
             foreach ($configOptions as $key => $value) {
                 $fieldValue = '';
                 $output .= '<div class="module_option">';
                 $method = $configOptions[$key]['type'];
                 $name = 'params[' . $i . '][' . $key . ']';
                 $options = array();
                 // if the values attribute is set
                 if ($configOptions[$key]['values'] != '') {
                     $extract_options = explode(',', $configOptions[$key]['values']);
                     if (count($extract_options) > 1) {
                         foreach ($extract_options as $item => $string) {
                             if (strpos($string, '=>')) {
                                 $keyVal = array_map('trim', explode('=>', $string));
                                 $options[$keyVal[0]] = $keyVal[1];
                             } else {
                                 $options[$string] = $string;
                             }
                         }
                     } else {
                         $fieldValue = $configOptions[$key]['default'];
                     }
                     // if helper is needed to render the object
                 } elseif ($configOptions[$key]['helper'] != '') {
                     $helper_name = $configOptions[$key]['helper'];
                     // is helper from current module or other?
                     if ($configOptions[$key]['module'] != '') {
                         $hmodule = $configOptions[$key]['module'];
                     } else {
                         $hmodule = $module;
                     }
                     // calling the helper class
                     $helper = frameCsp::_()->getModule($hmodule)->getHelper();
                     if ($helper) {
                         // calling the helper method for current option
                         if (method_exists($helper, $helper_name)) {
                             $options = $helper->{$helper_name}();
                         }
                     }
                 }
                 if (isset($param[$key])) {
                     $fieldValue = $param[$key];
                 } else {
                     if ($fieldValue == '') {
                         $fieldValue = $configOptions[$key]['default'];
                     }
                 }
                 // filling the parameters to build html element
                 $htmlParams = array('value' => $fieldValue, 'optionsCsp' => $options);
                 if ($method == 'checkbox') {
                     $htmlParams['value'] = 1;
                     $htmlParams['checked'] = (bool) $fieldValue;
                 }
                 if (!empty($configOptions[$key]['htmlParams']) && is_array($configOptions[$key]['htmlParams'])) {
                     $htmlParams = array_merge($htmlParams, $configOptions[$key]['htmlParams']);
                 }
                 // output label and html element
                 $output .= '<label>' . langCsp::_($configOptions[$key]['label']);
                 if ($configOptions[$key]['description'] != '') {
                     $output .= '<a class="toeOptTip" tip="' . langCsp::_($configOptions[$key]['description']) . '"></a>';
                 }
                 $output .= '</label><br />';
                 $output .= htmlCsp::$method($name, $htmlParams) . '<br />';
                 $output .= '</div>';
             }
             $i++;
             $output .= '</div>';
         }
     }
     return $output;
 }