コード例 #1
0
ファイル: show.php プロジェクト: thurti/humhub-modules-notes
<?php

echo \humhub\modules\notes\widgets\WallCreateForm::widget(['contentContainer' => $contentContainer]);
?>

<?php 
echo \humhub\modules\content\widgets\Stream::widget(array('contentContainer' => $contentContainer, 'streamAction' => '/notes/note/stream', 'messageStreamEmpty' => Yii::t('NotesModule.widgets_views_stream', 'There are no notes yet!'), 'messageStreamEmptyCss' => $contentContainer->canWrite() ? 'placeholder-empty-stream' : '', 'filters' => []));
?>



コード例 #2
0
 /**
  * Creates a new note via NoteFormWidget/ContentFormWidget
  */
 public function actionCreate()
 {
     $note = new Note();
     $note->title = Yii::$app->request->post('title');
     return \humhub\modules\notes\widgets\WallCreateForm::create($note);
 }