Beispiel #1
0
 /**
  * Prepares and returns an article
  *
  * @param User $user
  * @param str $title
  * @param int $count
  *
  * @return Article
  */
 public function prepareArticle(User $user = null, $title = null, $count = 1)
 {
     if (!$user) {
         $user = $this->userFactory->createUser();
     }
     $article = $this->articleFactory->createArticle($user, $title, $count);
     return $article;
 }
Beispiel #2
0
		</div>
		<div id="notification_menu">
			<?php 
$t_size = $notification_factory->size;
for ($i = 0; $i < $t_size; $i++) {
    $notification_factory->display($i);
}
?>
		</div>
	</div>
    </aside>
    <section id="actu">
      <!-- Articles publiés sans les commentaires-->
            <?php 
include_once "./class/ArticleFactory.php";
$profile_articles = new ArticleFactory("breezy");
$t_size = $profile_articles->size;
for ($i = 0; $i < $t_size; $i++) {
    $profile_articles->display($i);
    $profile_articles->display_comment_form($i);
}
?>
    </section>
    <footer>
     <p>ok</p>
    </footer>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script src="./script/adapt_size.js"></script>
    <script src="./script/like.js"></script>
    <script src="./script/comment.js"></script>
    <script src="./script/notification.js"></script>
 public function appendArticles($articles)
 {
     foreach ($articles as $article) {
         $article = ArticleFactory::build($article);
         $this->addArticle($article);
     }
 }