/** * put your comment there... * */ protected function getBlockParametersFormAction() { // Get block id. $blockId = (int) $_REQUEST['blockId']; // Get block form! $form = CJTxTable::getInstance('form')->setTableKey(array('blockId'))->setData(array('blockId' => $blockId))->load(); // Set HTTP header $this->httpContentType = 'text/html'; // Display form view. if ($form->get('blockId')) { // Load parameters form. $groups = new CJT_Models_Block_Parameters_Form_Groups($blockId); $params = new CJT_Models_Block_Parameters_Form_Parameters($blockId); $blockParams = new CJT_Framework_View_Block_Parameter_Parameters($params); // Return view content! $paramsView = CJTView::getInstance('tinymce/params', array('groups' => $groups, 'params' => $blockParams->getParams(), 'form' => $form->getData(), 'blockId' => $blockId)); // Return paramters form content! $this->response = $paramsView->getTemplate('default'); } else { // Error loading form! $this->response = cssJSToolbox::getText('The requested Block doesnt has parameters form!'); } }
/** * put your comment there... * */ public function dashboardMetaboxAction() { // Create View. $view = CJTView::getInstance('dashboard/metabox/statistics'); $view->display('default'); }
/** * put your comment there... * */ public function loadBlockAction() { // Block Id. $blockId = (int) $_GET['blockId']; // Get block content. $view = CJTView::getInstance('blocks/cjt-block'); $view->setBlock(CJTModel::create('blocks')->getBlock($blockId, array('returnCodeFile' => true))); // Return View content. $view->getTemplate('default'); $this->response = $view->structuredContent; }