public function render($tpl = null) { $app = JFactory::getApplication(); $this->type = $app->input->getCmd('type'); $this->id = $app->input->getInt('id'); $layout = $this->getLayout(); $this->format = $app->input->get('format'); $this->view = $app->input->get('view', 'default'); switch ($this->type) { case 'event': $this->var = 'event_id'; break; } //retrieve task list from model $model = new NoteModel(); if ($layout == "edit") { $notes = $model->getNote($this->id); } else { $notes = $model->getNotes($this->id, $this->type, false); } $this->notes = $notes; $this->categories = NoteHelper::getCategories(); //display echo parent::render(); }
public function execute() { $note_id = $this->getInput()->get('note_id'); $model = new NoteModel(); $note = $model->getNote($note_id); $note_view = ViewHelper::getView('note', 'entry', 'phtml', array('note' => $note[0])); echo $note_view->render(); }
public function execute() { $note_id = $this->getInput()->get('note_id'); $model = new NoteModel(); $item = $model->getNote($note_id); $item[0]['note_id'] = $note_id; $response = array('item' => $item[0], 'modal' => array('action' => 'show')); echo json_encode($response); }