PlacementAbsolute.php
1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace Nextend\SmartSlider3\Renderable\Placement;
class PlacementAbsolute extends AbstractPlacement {
public function attributes(&$attributes) {
$data = $this->component->data;
$attributes['data-pm'] = 'absolute';
$this->component->createProperty('responsiveposition', 1);
$this->component->createDeviceProperty('left', 0);
$this->component->createDeviceProperty('top', 0);
$this->component->createProperty('responsivesize', 1);
$this->component->createDeviceProperty('width');
$this->component->createDeviceProperty('height');
$this->component->createDeviceProperty('align');
$this->component->createDeviceProperty('valign');
// Chain
$attributes['data-parentid'] = $data->get('parentid');
$this->component->createDeviceProperty('parentalign');
$this->component->createDeviceProperty('parentvalign');
$isLegacyFontScale = $this->component->getOwner()
->getSlider()
->isLegacyFontScale();
if ($isLegacyFontScale) {
$adaptiveFont = intval($data->get('adaptivefont', 1));
if ($adaptiveFont === 0) {
$attributes['data-adaptivefont'] = 0;
}
}
}
public function adminAttributes(&$attributes) {
}
}