Conditions | 6 |
Paths | 3 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function getAdditionalCss($banners) |
||
27 | { |
||
28 | $ret = ''; |
||
29 | foreach ($banners as $banner) { |
||
30 | /** @var \DERHANSEN\SfBanners\Domain\Model\Banner $banner */ |
||
31 | if ($banner->getMarginTop() > 0 || $banner->getMarginRight() > 0 || |
||
32 | $banner->getMarginBottom() > 0 || $banner->getMarginLeft() > 0 |
||
33 | ) { |
||
34 | $bannerCss = '.banner-' . $banner->getUid() . ' { margin: ' . $banner->getMarginTop() . |
||
35 | 'px ' . $banner->getMarginRight() . 'px ' . $banner->getMarginBottom() . 'px ' . |
||
36 | $banner->getMarginLeft() . 'px; }' . chr(10) . chr(13); |
||
37 | $ret .= $bannerCss; |
||
38 | } |
||
39 | } |
||
40 | return $ret; |
||
41 | } |
||
42 | |||
59 |