コード例 #1
0
ファイル: Content.php プロジェクト: ahdail/humhub
 /**
  * Adds this this content to a given wall id
  *
  * If no wallId is given, the wallId of underlying content container is
  * used.
  *
  * @param Integer $wallId
  * @return \WallEntry
  */
 public function addToWall($wallId = 0)
 {
     if ($wallId == 0) {
         $contentContainer = $this->getContainer();
         $wallId = $contentContainer->wall_id;
     }
     $wallEntry = new WallEntry();
     $wallEntry->wall_id = $wallId;
     $wallEntry->content_id = $this->id;
     $wallEntry->save();
     return $wallEntry;
 }