Browse code

Add device showcase module

Benjamin Roth authored on05/01/2016 15:52:24
Showing1 changed files
... ...
@@ -28,6 +28,15 @@ class tl_module_esm_clients extends \Backend
28 28
 		return $this->getTemplateGroup('_clientsShowcase_');
29 29
 	}
30 30
 
31
+	/**
32
+	 * Return all device presentation templates as array
33
+	 * @return array
34
+	 */
35
+	public function getProjectDevicesTemplates()
36
+	{
37
+		return $this->getTemplateGroup('_project_devices_');
38
+	}
39
+
31 40
 	public function getClients()
32 41
 	{
33 42
 		$arrClients = array();
Browse code

Initial commit

Benjamin Roth authored on26/03/2015 15:24:56
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,44 @@
1
+<?php
2
+
3
+/**
4
+ * References for Contao
5
+ *
6
+ * Copyright (c) 2014 Benjamin Roth [http://www.esales-media.de]
7
+ *
8
+ * @package eSM_clients
9
+ * @link    http://www.esales-media.de
10
+ * @license commercial
11
+ */
12
+
13
+namespace eSM_clients;
14
+
15
+
16
+/**
17
+ * Class tl_module_esm_clients
18
+ * Provide miscellaneous methods that are used by the data configuration array.
19
+ */
20
+class tl_module_esm_clients extends \Backend
21
+{
22
+	/**
23
+	 * Return all clientsShowcase snippet templates as array
24
+	 * @return array
25
+	 */
26
+	public function getClientsShowcaseTemplates()
27
+	{
28
+		return $this->getTemplateGroup('_clientsShowcase_');
29
+	}
30
+
31
+	public function getClients()
32
+	{
33
+		$arrClients = array();
34
+
35
+		$Clients = \EsmClientsModel::findAll();
36
+
37
+		if (!is_null($Clients))
38
+		{
39
+			$arrClients = array_combine($Clients->fetchEach('id'),$Clients->fetchEach('title'));
40
+		}
41
+
42
+		return $arrClients;
43
+	}
44
+}
0 45
\ No newline at end of file