Exemplo n.º 1
0
 static function getAll()
 {
     if (self::$settings === null) {
         self::$settings = json_decode(N2SmartSliderStorage::get(self::$_type), true);
         if (self::$settings === null) {
             self::$settings = array();
         }
     }
     return self::$settings;
 }
Exemplo n.º 2
0
    public static function postBackgroundAnimationStorage(&$sets, &$animations)
    {
        N2Base::getApplicationInfo('smartslider')->loadLocale();
        array_push($sets, array('id' => 1000, 'referencekey' => '', 'value' => n2_('Default')));
        array_push($animations, array("id" => 1001, 'referencekey' => 1000, "value" => array('name' => n2_('Downscale'), 'data' => array('duration' => 5, 'strength' => array('scale'), 'from' => array('scale' => 1.5), 'to' => array('scale' => 1.2)))));
        array_push($animations, array("id" => 1002, 'referencekey' => 1000, "value" => array('name' => n2_('Downscale left'), 'data' => array('duration' => 5, 'strength' => array('scale', 'x'), 'from' => array('scale' => 1.5, 'x' => 0), 'to' => array('scale' => 1.2, 'x' => -100)))));
        array_push($animations, array("id" => 1003, 'referencekey' => 1000, "value" => array('name' => n2_('Downscale right'), 'data' => array('duration' => 5, 'strength' => array('scale', 'x'), 'from' => array('scale' => 1.5, 'x' => 0), 'to' => array('scale' => 1.2, 'x' => 100)))));
        array_push($animations, array("id" => 1004, 'referencekey' => 1000, "value" => array('name' => n2_('Downscale top'), 'data' => array('duration' => 5, 'strength' => array('scale', 'y'), 'from' => array('scale' => 1.5, 'y' => 0), 'to' => array('scale' => 1.2, 'y' => -100)))));
        array_push($animations, array("id" => 1005, 'referencekey' => 1000, "value" => array('name' => n2_('Downscale bottom'), 'data' => array('duration' => 5, 'strength' => array('scale', 'y'), 'from' => array('scale' => 1.5, 'y' => 0), 'to' => array('scale' => 1.2, 'y' => 100)))));
        array_push($animations, array("id" => 1006, 'referencekey' => 1000, "value" => array('name' => n2_('Upscale'), 'data' => array('duration' => 5, 'strength' => array('scale'), 'from' => array('scale' => 1.2), 'to' => array('scale' => 1.5)))));
        array_push($animations, array("id" => 1007, 'referencekey' => 1000, "value" => array('name' => n2_('Upscale left'), 'data' => array('duration' => 5, 'strength' => array('scale', 'x'), 'from' => array('scale' => 1.2, 'x' => 0), 'to' => array('scale' => 1.5, 'x' => 100)))));
        array_push($animations, array("id" => 1008, 'referencekey' => 1000, "value" => array('name' => n2_('Upscale right'), 'data' => array('duration' => 5, 'strength' => array('scale', 'x'), 'from' => array('scale' => 1.2, 'x' => 0), 'to' => array('scale' => 1.5, 'x' => -100)))));
        array_push($animations, array("id" => 1009, 'referencekey' => 1000, "value" => array('name' => n2_('Upscale top'), 'data' => array('duration' => 5, 'strength' => array('scale', 'y'), 'from' => array('scale' => 1.2, 'y' => 0), 'to' => array('scale' => 1.5, 'y' => 100)))));
        array_push($animations, array("id" => 1010, 'referencekey' => 1000, "value" => array('name' => n2_('Upscale bottom'), 'data' => array('duration' => 5, 'strength' => array('scale', 'y'), 'from' => array('scale' => 1.2, 'y' => 0), 'to' => array('scale' => 1.5, 'y' => -100)))));
        array_push($animations, array("id" => 1011, 'referencekey' => 1000, "value" => array('name' => n2_('To left'), 'data' => array('duration' => 5, 'strength' => array('x'), 'from' => array('scale' => 1.5, 'x' => 0), 'to' => array('scale' => 1.5, 'x' => 100)))));
        array_push($animations, array("id" => 1012, 'referencekey' => 1000, "value" => array('name' => n2_('To right'), 'data' => array('duration' => 5, 'strength' => array('x'), 'from' => array('scale' => 1.5, 'x' => 0), 'to' => array('scale' => 1.5, 'x' => -100)))));
        array_push($animations, array("id" => 1013, 'referencekey' => 1000, "value" => array('name' => n2_('To top'), 'data' => array('duration' => 5, 'strength' => array('y'), 'from' => array('scale' => 1.5, 'y' => 0), 'to' => array('scale' => 1.5, 'y' => 100)))));
        array_push($animations, array("id" => 1014, 'referencekey' => 1000, "value" => array('name' => n2_('To bottom'), 'data' => array('duration' => 5, 'strength' => array('y'), 'from' => array('scale' => 1.5, 'y' => 0), 'to' => array('scale' => 1.5, 'y' => -100)))));
        array_push($animations, array("id" => 1015, 'referencekey' => 1000, "value" => array('name' => n2_('To bottom left'), 'data' => array('duration' => 5, 'strength' => array('x', 'y'), 'from' => array('scale' => 1.5, 'x' => 0, 'y' => 0), 'to' => array('scale' => 1.5, 'x' => 100, 'y' => -100)))));
        array_push($animations, array("id" => 1016, 'referencekey' => 1000, "value" => array('name' => n2_('To top right'), 'data' => array('duration' => 5, 'strength' => array('x', 'y'), 'from' => array('scale' => 1.5, 'x' => 0, 'y' => 0), 'to' => array('scale' => 1.5, 'x' => -100, 'y' => 100)))));
        array_push($animations, array("id" => 1017, 'referencekey' => 1000, "value" => array('name' => n2_('To bottom left'), 'data' => array('duration' => 5, 'strength' => array('x', 'y'), 'from' => array('scale' => 1.5, 'x' => 0, 'y' => 0), 'to' => array('scale' => 1.5, 'x' => 100, 'y' => -100)))));
        array_push($animations, array("id" => 1018, 'referencekey' => 1000, "value" => array('name' => n2_('To bottom right'), 'data' => array('duration' => 5, 'strength' => array('x', 'y'), 'from' => array('scale' => 1.5, 'x' => 0, 'y' => 0), 'to' => array('scale' => 1.5, 'x' => -100, 'y' => -100)))));
    }
    public static function layoutStorage(&$sets, &$layouts)
    {
        N2Base::getApplicationInfo('smartslider')->loadLocale();
        array_push($sets, array('id' => 1900, 'referencekey' => '', 'value' => n2_('My layouts')));
    }
}
N2SmartSliderStorage::init();