<?php
/*
	DevSaver Web Framework
	Copyright (c) 2002-2018 DevSaver. 
	All rights reserved.
		web:  www.devsaver.com
		mail: support@devsaver.com
*/

if (!defined("STPBase")) {
	die("This file can't be accessed directly!");
}

class CWidgetsWidgetImage extends CWidget {

	/**
	* description
	*
	* @var type
	*
	* @access type
	*/
	var $meta = array(
		"type"	=> "15",
		"name"	=> "Image",
		"module"	=> array(
			"name"	=> "",
			"id"	=> "",
			"type"	=> "",
		)
	);


	/**
	* description
	*
	* @param
	*
	* @return
	*
	* @access
	*/
	function Render($widget) {

		$link = $this->plugins["modules"]->BuildLink(array(
			"type"		=> $widget["settings"]["lang_link_type"],
			"link"		=> $widget["settings"]["lang_link_link"],
			"module"	=> $widget["settings"]["lang_link_module"],
			"global"	=> $widget["settings"]["lang_link_global"]
		));


		if ($link) {				
			$block = "Link";
			$widget["link"] = $link;
		} else {
			$block = "NoLink";
		}
		
		return $this->tpl->blockReplace(
			$block,
			$widget,
			$widget["settings"]
		);

	}
	

}


?>