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


	class AdminArticleLeadpicture extends AdminTextbox {
		protected $sValue = "";
		protected $sTitle = "";
		protected $bShowTitle = false;
		protected $iArticleId = 0;
		protected $bOnDeletion = false;


		public function __construct( $id , $parent = null ) {
			parent::__construct( $id , $parent );
		}

		public function refreshValueFromArray( $arr = null ) {
			if (!isset( $arr )) $arr = $this->aP;
			$this->bOnDeletion = (isset( $arr[$this->getId()."_delete"] ));
		}

		public function isOnDeletion() { return $this->bOnDeletion; }

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

		public function render() {
			if ($this->sRendered) return $this->sRendered;
			$this->setParam( "value" , $this->sValue );
			$this->setParam( "title" , $this->sTitle );
			$this->setParam( "bShowTitle" , $this->bShowTitle );
			return parent::render();
		}

	}

?>
