<?php
	require_once( $GLOBALS["site_root"] . "/includes/widgets/Widget.inc.php" );
	require_once( $GLOBALS["site_root"] . "/includes/models/Articles.inc.php" );

	class ArticleConnecteds extends Widget {
		protected $article_id = 0;


		public function setArticleId( $v ) { $this->article_id = $v; }

		public function render() {
			if ($this->sRendered) return $this->sRendered;
			$am = new ArticlesModel();
			$connecteds = $am->getConnectedArticles( $this->article_id );
			$this->setParam( "connected_articles" , $connecteds );
			return parent::render();
		}
	}

?>
