1 <?php
2
3 /* --------------------------------------------------------------
4 EmptyProductImage.inc.php 2016-01-04
5 Gambio GmbH
6 http://www.gambio.de
7 Copyright (c) 2016 Gambio GmbH
8 Released under the GNU General Public License (Version 2)
9 [http://www.gnu.org/licenses/gpl-2.0.html]
10 --------------------------------------------------------------
11 */
12
13 /**
14 * Class EmptyProductImage
15 *
16 * @category System
17 * @package Product
18 * @subpackage Entities
19 */
20 class EmptyProductImage extends ProductImage
21 {
22 // Overriding the parent constructor
23 public function __construct()
24 {
25 $this->filename = '';
26 $this->productVisibility = false;
27 }
28
29
30 /**
31 * Get Alt Text
32 *
33 * Returns the alternative text of a product image if a name is already set,
34 * otherwise an empty string will be returned.
35 *
36 * @param \LanguageCode $language The language code of the alt text to return.
37 *
38 * @return string The alternative text of the product image.
39 */
40 public function getAltText(LanguageCode $language)
41 {
42 return $this->altTexts[$language->asString()] ? : '';
43 }
44 }