| Current Path : /proc/thread-self/root/var/tmp/ |
| Current File : //proc/thread-self/root/var/tmp/phpFjKaaC |
ModelPostBackgroundAnimation.php 0000644 00000004135 15241052545 0013031 0 ustar 00 <?php
namespace Nextend\SmartSlider3Pro\PostBackgroundAnimation;
use Nextend\Framework\Form\Container\ContainerTable;
use Nextend\Framework\Form\Element\Select;
use Nextend\Framework\Form\Element\Text\NumberAutoComplete;
use Nextend\Framework\Form\Fieldset\FieldsetVisualSet;
use Nextend\Framework\Form\Form;
use Nextend\Framework\Model\StorageSectionManager;
use Nextend\Framework\Visual\ModelVisual;
class ModelPostBackgroundAnimation extends ModelVisual {
protected $type = 'postbackgroundanimation';
protected function init() {
PostBackgroundAnimationStorage::getInstance();
$this->storage = StorageSectionManager::getStorage('smartslider');
}
protected function getPath() {
return dirname(__FILE__);
}
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(), 'postbackgroundanimation-sets', n2_('Animation type'));
new Select($setsTab, 'sets', false);
$form->render();
}
public function renderForm() {
$form = new Form($this, 'n2-post-background');
$table = new ContainerTable($form->getContainer(), 'post-background-preview', n2_('Preview'));
$table->setFieldsetPositionEnd();
new NumberAutoComplete($table->getFieldsetLabel(), 'transformorigin-x', false, '50', array(
'style' => 'width:22px;',
'values' => array(
0,
50,
100
),
'unit' => '%',
'sublabel' => 'X'
));
new NumberAutoComplete($table->getFieldsetLabel(), 'transformorigin-y', false, '50', array(
'style' => 'width:22px;',
'values' => array(
0,
50,
100
),
'unit' => '%',
'sublabel' => 'Y'
));
$form->render();
}
} PostBackgroundAnimationManager.php 0000644 00000001032 15241052547 0013336 0 ustar 00 <?php
namespace Nextend\SmartSlider3Pro\PostBackgroundAnimation;
use Nextend\Framework\Pattern\VisualManagerTrait;
use Nextend\SmartSlider3Pro\PostBackgroundAnimation\Block\PostBackgroundAnimationManager\BlockPostBackgroundAnimationManager;
class PostBackgroundAnimationManager {
use VisualManagerTrait;
public function display() {
$postBackgroundAnimationManagerBlock = new BlockPostBackgroundAnimationManager($this->MVCHelper);
$postBackgroundAnimationManagerBlock->display();
}
} PostBackgroundAnimationStorage.php 0000644 00000005210 15241052550 0013364 0 ustar 00 <?php
namespace Nextend\SmartSlider3Pro\PostBackgroundAnimation;
use Nextend\Framework\Pattern\SingletonTrait;
use Nextend\Framework\Plugin;
class PostBackgroundAnimationStorage {
use SingletonTrait;
private $sets = array();
private $animation = array();
private $animationBySet = array();
private $animationById = array();
protected function init() {
Plugin::addAction('smartsliderpostbackgroundanimationset', array(
$this,
'animationSet'
));
Plugin::addAction('smartsliderpostbackgroundanimation', array(
$this,
'animations'
));
Plugin::addAction('postbackgroundanimation', array(
$this,
'animation'
));
}
private function load() {
static $loaded;
if (!$loaded) {
Plugin::doAction('postBackgroundAnimationStorage', array(
&$this->sets,
&$this->animation
));
for ($i = 0; $i < count($this->animation); $i++) {
if (!isset($this->animationBySet[$this->animation[$i]['referencekey']])) {
$this->animationBySet[$this->animation[$i]['referencekey']] = array();
}
$this->animationBySet[$this->animation[$i]['referencekey']][] = &$this->animation[$i];
$this->animationById[$this->animation[$i]['id']] = &$this->animation[$i];
}
$loaded = true;
}
}
public function animationSet($referenceKey, &$sets) {
$this->load();
for ($i = count($this->sets) - 1; $i >= 0; $i--) {
$this->sets[$i]['isSystem'] = 1;
$this->sets[$i]['editable'] = 0;
array_unshift($sets, $this->sets[$i]);
}
}
public function animations($referenceKey, &$animation) {
$this->load();
if (isset($this->animationBySet[$referenceKey])) {
$_animation = &$this->animationBySet[$referenceKey];
for ($i = count($_animation) - 1; $i >= 0; $i--) {
$_animation[$i]['isSystem'] = 1;
$_animation[$i]['editable'] = 0;
array_unshift($animation, $_animation[$i]);
}
}
}
public function animation($id, &$animation) {
$this->load();
if (isset($this->animationById[$id])) {
$this->animationById[$id]['isSystem'] = 1;
$this->animationById[$id]['editable'] = 0;
$animation = $this->animationById[$id];
}
}
} Block/PostBackgroundAnimationManager/BlockPostBackgroundAnimationManager.php 0000644 00000003342 15241052553 0023426 0 ustar 00