public function __construct($model, $controllerId, $moduleId, $saveActionId, $urlParameters, $uniquePageId, $uniqueId) { assert('is_int($uniqueId)'); assert('$model instanceof Comment'); parent::__construct($model, $controllerId, $moduleId, $saveActionId, $urlParameters, $uniquePageId); $this->uniqueId = $uniqueId; }
protected function renderMissionCreateCommentContent() { $content = ZurmoHtml::tag('h2', array(), Zurmo::t('MissionsModule', 'Add Comment')); $comment = new Comment(); $uniquePageId = 'CommentInlineEditForModelView'; $redirectUrl = Yii::app()->createUrl('/missions/default/inlineCreateCommentFromAjax', array('id' => $this->model->id, 'uniquePageId' => $uniquePageId)); $urlParameters = array('relatedModelId' => $this->model->id, 'relatedModelClassName' => 'Mission', 'relatedModelRelationName' => 'comments', 'redirectUrl' => $redirectUrl); //After save, the url to go to. $inlineView = new CommentInlineEditView($comment, 'default', 'comments', 'inlineCreateSave', $urlParameters, $uniquePageId); $content .= $inlineView->render(); return ZurmoHtml::tag('div', array('id' => 'CommentInlineEditForModelView'), $content); }