Пример #1
0
 /**
  * On init of the WallEntryLinksWidget, attach the comment link widget.
  *
  * @param CEvent $event
  */
 public static function onWallEntryLinksInit($event)
 {
     if ($event->sender->object->content === null) {
         return;
     }
     if (\Yii::$app->getModule('comment')->canComment($event->sender->object->content)) {
         $event->sender->addWidget(widgets\CommentLink::className(), array('object' => $event->sender->object), array('sortOrder' => 10));
     }
 }
Пример #2
0
 /**
  * On init of the WallEntryLinksWidget, attach the comment link widget.
  *
  * @param CEvent $event
  */
 public static function onWallEntryLinksInit($event)
 {
     $event->sender->addWidget(widgets\CommentLink::className(), array('object' => $event->sender->object), array('sortOrder' => 10));
 }