<?php

/**
 * References for Contao
 *
 * Copyright (c) 2014 Benjamin Roth [http://www.esales-media.de]
 *
 * @package eSM_clients
 * @link    http://www.esales-media.de
 * @license commercial
 */

namespace eSM_clients;


/**
 * Class tl_module_esm_clients
 * Provide miscellaneous methods that are used by the data configuration array.
 */
class tl_module_esm_clients extends \Backend
{
	/**
	 * Return all clientsShowcase snippet templates as array
	 * @return array
	 */
	public function getClientsShowcaseTemplates()
	{
		return $this->getTemplateGroup('_clientsShowcase_');
	}

	/**
	 * Return all device presentation templates as array
	 * @return array
	 */
	public function getProjectDevicesTemplates()
	{
		return $this->getTemplateGroup('_project_devices_');
	}

	public function getClients()
	{
		$arrClients = array();

		$Clients = \EsmClientsModel::findAll();

		if (!is_null($Clients))
		{
			$arrClients = array_combine($Clients->fetchEach('id'),$Clients->fetchEach('title'));
		}

		return $arrClients;
	}
}