public function actionRelationsAndAttributesTree($type, $treeType, $id = null, $nodeId = null, $isBeingCopied = false) { $postData = PostUtil::getData(); $savedWorkflow = null; $workflow = null; $this->resolveSavedWorkflowAndWorkflowByPostData($postData, $savedWorkflow, $workflow, $type, $id, (bool) $isBeingCopied); if ($nodeId != null) { $wizardToTreeAdapter = new WorkflowRelationsAndAttributesToTreeAdapter($workflow, $treeType); echo ZurmoTreeView::saveDataAsJson($wizardToTreeAdapter->getData($nodeId)); Yii::app()->end(0, false); } $view = new WorkflowRelationsAndAttributesTreeView($type, $treeType, 'edit-form'); $content = $view->render(); Yii::app()->getClientScript()->setToAjaxMode(); Yii::app()->getClientScript()->render($content); echo $content; }