Browse code

Replace deprecated wallpaper slide with image slide

Benjamin Roth authored on01/06/2018 14:18:43
Showing1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,77 +0,0 @@
1
-<?php
2
-
3
-/**
4
- * Slick slider for Contao
5
- *
6
- * Copyright (c) 2016 Benjamin Roth
7
- *
8
- * @license LGPL-3.0+
9
- */
10
-
11
-namespace eSM_slick;
12
-
13
-
14
-/**
15
- * Front end content element slick slider start.
16
- */
17
-class ContentSlickSliderWallpaper extends \ContentElement
18
-{
19
-
20
-	/**
21
-	 * Template
22
-	 * @var string
23
-	 */
24
-	protected $strTemplate = 'ce_slick_slider_wallpaper';
25
-
26
-
27
-	public function generate()
28
-	{
29
-		if ($this->singleSRC == '')
30
-		{
31
-			return '';
32
-		}
33
-
34
-		$objFile = \FilesModel::findByUuid($this->singleSRC);
35
-
36
-		if ($objFile === null)
37
-		{
38
-			if (!\Validator::isUuid($this->singleSRC))
39
-			{
40
-				return '<p class="error">'.$GLOBALS['TL_LANG']['ERR']['version2format'].'</p>';
41
-			}
42
-
43
-			return '';
44
-		}
45
-
46
-		if (!is_file(TL_ROOT . '/' . $objFile->path))
47
-		{
48
-			return '';
49
-		}
50
-
51
-		$this->singleSRC = $objFile->path;
52
-
53
-		return parent::generate();
54
-	}
55
-
56
-
57
-	/**
58
-	 * Generate the content element
59
-	 */
60
-	protected function compile()
61
-	{
62
-		if (TL_MODE == 'BE')
63
-		{
64
-			$this->strTemplate = 'ce_image';
65
-
66
-			/** @var \BackendTemplate|object $objTemplate */
67
-			$objTemplate = new \BackendTemplate($this->strTemplate);
68
-
69
-			$this->Template = $objTemplate;
70
-		}
71
-
72
-		$GLOBALS['TL_CSS'][] = '/system/modules/eSM_slick/assets/css/slick-wallpaper.css';
73
-
74
-		$this->addImageToTemplate($this->Template, $this->arrData);
75
-		$this->Template->text = nl2br($this->eSM_slick_text);
76
-	}
77
-}
Browse code

Initial commit

Benjamin Roth authored on16/02/2017 11:35:38
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,77 @@
1
+<?php
2
+
3
+/**
4
+ * Slick slider for Contao
5
+ *
6
+ * Copyright (c) 2016 Benjamin Roth
7
+ *
8
+ * @license LGPL-3.0+
9
+ */
10
+
11
+namespace eSM_slick;
12
+
13
+
14
+/**
15
+ * Front end content element slick slider start.
16
+ */
17
+class ContentSlickSliderWallpaper extends \ContentElement
18
+{
19
+
20
+	/**
21
+	 * Template
22
+	 * @var string
23
+	 */
24
+	protected $strTemplate = 'ce_slick_slider_wallpaper';
25
+
26
+
27
+	public function generate()
28
+	{
29
+		if ($this->singleSRC == '')
30
+		{
31
+			return '';
32
+		}
33
+
34
+		$objFile = \FilesModel::findByUuid($this->singleSRC);
35
+
36
+		if ($objFile === null)
37
+		{
38
+			if (!\Validator::isUuid($this->singleSRC))
39
+			{
40
+				return '<p class="error">'.$GLOBALS['TL_LANG']['ERR']['version2format'].'</p>';
41
+			}
42
+
43
+			return '';
44
+		}
45
+
46
+		if (!is_file(TL_ROOT . '/' . $objFile->path))
47
+		{
48
+			return '';
49
+		}
50
+
51
+		$this->singleSRC = $objFile->path;
52
+
53
+		return parent::generate();
54
+	}
55
+
56
+
57
+	/**
58
+	 * Generate the content element
59
+	 */
60
+	protected function compile()
61
+	{
62
+		if (TL_MODE == 'BE')
63
+		{
64
+			$this->strTemplate = 'ce_image';
65
+
66
+			/** @var \BackendTemplate|object $objTemplate */
67
+			$objTemplate = new \BackendTemplate($this->strTemplate);
68
+
69
+			$this->Template = $objTemplate;
70
+		}
71
+
72
+		$GLOBALS['TL_CSS'][] = '/system/modules/eSM_slick/assets/css/slick-wallpaper.css';
73
+
74
+		$this->addImageToTemplate($this->Template, $this->arrData);
75
+		$this->Template->text = nl2br($this->eSM_slick_text);
76
+	}
77
+}