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


class CSocialMediaWidgetProfiles extends CWidget {

	/**
	* description
	*
	* @var type
	*
	* @access type
	*/
	var $meta = array(
		"type"	=> "1",
		"name"	=> "Social Profile Links",
	);

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

		$this->module->__init();


		if (!is_array($this->module->items)) {
			return "";
		}
		
		foreach ($this->module->items as $key => $val) {
			if ($val["service_profile"]) {
				$profiles[] = $val;
			}			
		}
		

		if (!is_array($profiles)) {
			return "";
		}

		return $this->tpl->blockREplace(
			"Main" , 
			array(
				"profiles"	=> $base->html->Table(
					$this->tpl,
					"" , 
					$profiles
				),
			),
			$widget,
			$widget["settings"]
		);

	}
			

}


?>