ModelBackgroundAnimation.php
1.42 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
47
48
49
50
51
<?php
namespace Nextend\SmartSlider3\BackgroundAnimation;
use Nextend\Framework\Form\Container\ContainerTable;
use Nextend\Framework\Form\Element\Select;
use Nextend\Framework\Form\Element\Text\Color;
use Nextend\Framework\Form\Fieldset\FieldsetVisualSet;
use Nextend\Framework\Form\Form;
use Nextend\Framework\Model\StorageSectionManager;
use Nextend\Framework\Visual\ModelVisual;
class ModelBackgroundAnimation extends ModelVisual {
protected $type = 'backgroundanimation';
protected function init() {
BackgroundAnimationStorage::getInstance();
$this->storage = StorageSectionManager::getStorage('smartslider');
}
public function renderSetsForm() {
$form = new Form($this, $this->type . 'set');
$form->addClass('n2_fullscreen_editor__content_sidebar_top_bar');
$form->setDark();
$setsTab = new FieldsetVisualSet($form->getContainer(), 'backgroundanimation-sets', n2_('Animation type'));
new Select($setsTab, 'sets', false);
echo $form->render();
}
public function renderForm() {
$form = new Form($this, 'n2-background-animation');
$table = new ContainerTable($form->getContainer(), 'background-animation-preview', n2_('Preview'));
$table->setFieldsetPositionEnd();
new Color($table->getFieldsetLabel(), 'color', false, '333333ff', array(
'alpha' => true
));
$form->render();
}
}