public function edit() { $type = $this->input->get('eletype', 'AzuraText'); $id = $this->input->get('id', '', 'int'); //echo'<pre>';var_dump($type);exit; if ($id > 0) { $model = $this->getModel('Element'); $element = $model->getItem($id); $element->attrs = json_decode($element->attrs); $element->content = rawurlencode($element->content); $element->shortcode = ''; $data = rawurlencode(json_encode($element)); } else { $element = new stdClass(); $element->type = $type; $element->attrs = new stdClass(); $element->content = ''; $data = rawurlencode(json_encode($element)); } if ($type == 'AzuraHtml') { $app = JFactory::getApplication(); $app->setUserState('com_azurapagebuilder.element.html.data', $data); //echo $this->configAzurahtml($data,$element); } //else{ $type = strtolower($type); $optionFormName = 'formoption' . substr($type, 5); echo CthShortcodes::renderElementOptions($optionFormName, $element, $data); //} exit; }