protected function printViewContent() { if ($this->userID instanceof CustomUser) { $user = $this->userID; } else { $user = new CustomUser($this->userID); } ?> <div class="center-align" style="padding-top: 6px;"> <img class="img-circle" src="<?php echo $user->Image; ?> " alt="Nevarēju atrast bildi" width="140" height="140"> <h4><?php echo $user->getFullName(); ?> </h4> <?php if ($user->ShowDetails) { ?> <p><a href="mailto:<?php echo $user->Email; ?> "><?php echo $user->Email; ?> </a></p> <p><?php echo $user->PhoneNumber; ?> </p> <?php } ?> </div> <?php }
public static function getCommentsForCommentID($id) { if (is_int($id) || is_string($id)) { $comment = new Comment($id); } else { $comment = $id; } $builder = ""; $user = new CustomUser($comment->PostedBy); $fullname = ucwords($user->getFullName()); $subCommentBuilder = ""; $comments = Comment::find(new Equals('InReplyTo', $comment->UniqueIdentifier)); foreach ($comments as $c) { $subCommentBuilder .= self::getCommentsForCommentID($c->CommentID); } $com = nl2br($comment->Comment); $builder .= <<<HTML <div class="comment-outer"> <div class="comment-background-underlay"></div> <div class="comment-outer-image"> <img src="{$user->Image}"> </div> <div class="comment-outer-text"> <div class="comment-outer-title"> <span class="comment-inner-name">{$fullname}</span><span class="comment-inner-date">{$comment->PostedAt}</span> </div> <div class="delete"> X </div> <div class="comment-inner-text">{$com}</div> <a href="#" comId="{$comment->UniqueIdentifier}" class="comment-reply">Atbildēt</a> </div> <div class="__clear-floats"></div> {$subCommentBuilder} </div> <div class="__clear-floats"></div> HTML; return $builder; }