<?php
defined('PRODUCT_NAME') or die;
class ServicesModule extends ModuleInstance
{
	function render()
	{
		$data = array("module_instance_id" 	=> $this->module_instance_id,
		              "title" 				=> $this->setting("title"),
		              "title_heading_level" => $this->setting("title_heading_level"),
		              "module_class" 		=> $this->setting("module_class"),
		              "icon_size" 			=> $this->setting("icon_size"),
		              "column_size" 		=> $this->setting("column_size"),
		              "number_of_services" 	=> $this->setting("number_of_services"));

		for($i=1; $i<=$this->setting("number_of_services"); $i++)
		{
			$data["title" . $i] 		= $this->setting("title" . $i);
			$data["description" . $i] 	= $this->setting("description" . $i);
			$data["icon" . $i] 			= $this->setting("icon" . $i);
			$data["url" . $i] 			= $this->setting("url" . $i);
			$data["button_text" . $i] 	= $this->setting("button_text" . $i);
		}

		$this->load->view("modules/services/module", $data);
	}
}
