Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 757
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 757
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 758
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/ticnews.com.br/web/wp-includes/script-loader.php on line 758
Notice: require(): read of 8604 bytes failed with errno=12 Cannot allocate memory in /var/www/html/ticnews.com.br/web/wp-content/plugins/google-maps-easy/functions.php on line 44
Notice: require(): read of 8604 bytes failed with errno=12 Cannot allocate memory in /var/www/html/ticnews.com.br/web/wp-content/plugins/google-maps-easy/functions.php on line 44
add_option = __('Add Checkbox', GMP_LANG_CODE);
$options_tag = '';
$image_tag = ' style="display:none"';
break;
case 9:
$add_option = __('Add Item', GMP_LANG_CODE);
$options_tag = '';
$image_tag = ' style="display:none"';
break;
case 12:
$add_option = __('Add Item', GMP_LANG_CODE);
$options_tag = '';
$image_tag = ' style="display:none"';
break;
case 10:
$options_tag = '';
$add_option = __('Add Radio Button', GMP_LANG_CODE);
$image_tag = ' style="display:none"';
break;
case 8:
$image_tag = '';
$options_tag = ' style="display:none"';
break;
default:
$options_tag = ' style="display:none"';
$image_tag = ' style="display:none"';
break;
}
if ($tag > 0 || $id == 0) {
$output .= '
';
$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 = frameGmp::_()->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,'optionsGmp'=>$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 .= ' ';
$output .= htmlGmp::$method($name,$htmlParams).' ';
$output .= '
';
}
$i++;
$output .= '
';
}
}
return $output;
}
public function displayConfig($module) {
echo $this->drawConfig($module);
}
/**
* This method will prepare internal value to it's type
* @see $this->type
* @return mixed - prepared value on the basis of $this->type
*/
public function valToType() {
switch($this->type) {
case 'int':
case 'mediumint':
case 'smallint':
$this->value = (int) $this->value;
break;
case 'float':
$this->value = (float) $this->value;
break;
case 'double':
case 'decimal':
$this->value = (double) $this->value;
break;
}
return $this->type;
}
}