/** * When PHP shuts down, we have to save our session's data if the data changed */ public function shutdown() { N2Pluggable::doAction('beforeSessionSave'); if ($this->storageChanged) { $this->store(); } }
function n2_exit($exit = false) { N2Pluggable::doAction('exit'); if ($exit) { exit; } }
public static function getAll($application, $section, $referenceKey = null) { $attributes = array("application" => $application, "section" => $section); if ($referenceKey !== null) { $attributes['referencekey'] = $referenceKey; } $rows = self::$model->db->findAllByAttributes($attributes, array("id", "referencekey", "value", "system", "editable")); N2Pluggable::doAction($application . $section, array($referenceKey, &$rows)); return $rows; }
public function renderDefaultsForm() { $settings = array('font' => array(), 'style' => array()); N2Pluggable::doAction('smartsliderDefault', array(&$settings)); $xmlString = '<root>'; $this->defaultsAddTab($xmlString, $settings['font'], 'font', 'Font'); $this->defaultsAddTab($xmlString, $settings['style'], 'style', 'Style'); $xmlString .= '</root>'; $form = new N2Form(); $xml = simplexml_load_string($xmlString); $form->setXML($xml); $form->render('defaults'); }
private static function load() { static $loaded; if (!$loaded) { N2Pluggable::doAction('backgroundAnimationStorage', array(&self::$sets, &self::$animation)); for ($i = 0; $i < count(self::$animation); $i++) { if (!isset(self::$animationBySet[self::$animation[$i]['referencekey']])) { self::$animationBySet[self::$animation[$i]['referencekey']] = array(); } self::$animationBySet[self::$animation[$i]['referencekey']][] =& self::$animation[$i]; self::$animationById[self::$animation[$i]['id']] =& self::$animation[$i]; } $loaded = true; } }
private static function load() { static $loaded; if (!$loaded) { N2Pluggable::doAction('layoutStorage', array(&self::$sets, &self::$visual)); for ($i = 0; $i < count(self::$visual); $i++) { if (!is_array(self::$visualBySet[self::$visual[$i]['referencekey']])) { self::$visualBySet[self::$visual[$i]['referencekey']] = array(); } self::$visualBySet[self::$visual[$i]['referencekey']][] =& self::$visual[$i]; self::$visualById[self::$visual[$i]['id']] =& self::$visual[$i]; } $loaded = true; } }
private static function animation($force = false) { static $once; if ($once != null && !$force) { return; } $once = true; if (N2Pluggable::hasAction('animationFramework')) { N2Pluggable::doAction('animationFramework'); } else { if (N2Settings::get('gsap')) { N2JS::addFiles(N2LIBRARYASSETS . "/js/core/gsap", array("gsap.js"), "nextend-frontend"); } else { if (N2Platform::$isAdmin) { N2JS::addFiles(N2LIBRARYASSETS . "/js/core/gsap", array("gsap.js"), "nextend-gsap"); } else { N2JS::addFiles(N2LIBRARYASSETS . "/js/core/gsap", array("NextendTimeline.js"), "nextend-gsap"); } } } }
private static function init() { static $initialized = false; if (!$initialized) { N2Loader::importAll('libraries.mvc.application'); N2Loader::importAll('libraries.mvc'); N2Loader::importAll('libraries.mvc.controllers'); N2Loader::importAll('libraries.cache'); N2Loader::importAll('libraries.assets'); N2Loader::importAll('libraries.google'); N2Loader::importAll('libraries.assets.css'); N2Loader::importAll('libraries.assets.js'); N2Loader::importAll('libraries.assets.less'); N2Loader::importAll('libraries.assets.google'); N2Loader::importAll('libraries.uri'); N2Loader::import('libraries.acl.acl'); N2Loader::import('libraries.message.message'); N2Loader::import('libraries.image.helper'); $initialized = true; self::$isReady = true; N2Pluggable::doAction('nextendBaseReady'); } }
protected function onCreate() { N2Pluggable::doAction('ssSlide', array($this)); }
* @see Nav */ $views = array(N2Html::tag('a', array('href' => $this->appType->router->createUrl("sliders/index"), 'class' => 'n2-h4 n2-uc ' . ($cmd == "sliders" ? "n2-active" : "")), n2_('Sliders')), N2Html::tag('a', array('href' => $this->appType->router->createUrl("settings/default"), 'class' => 'n2-h4 n2-uc ' . ($cmd == "settings" ? "n2-active" : "")), n2_('Settings')), N2Html::tag('a', array('href' => N2Base::getApplication('system')->router->createUrl("dashboard/index"), 'class' => 'n2-h4 n2-uc ' . ($cmd == "settings" ? "n2-active" : "")), n2_('Nextend'))); $views[] = N2Html::tag('a', array('href' => N2SS3::getProUrlPricing(), 'target' => '_blank', 'class' => 'n2-h4 n2-uc '), n2_('Go Pro!')); $this->widget->init('nav', array('logoUrl' => $this->appType->router->createUrl("sliders/index"), 'logoImageUrl' => $this->appType->app->getLogo(), 'views' => $views, 'actions' => $this->getFragmentValue('actions'))); ?> <div class="n2-table n2-table-fixed n2-content"> <div class="n2-tr"> <div class="n2-td n2-sidebar n2-sidebar-base-bg n2-border-radius-bl"> <?php $this->renderFragmentBlock('nextend_sidebar', '_sliders'); ?> </div> <div class="n2-td n2-content-base-bg n2-content-area n2-border-radius-br"> <!-- Begin Content --> <?php $this->renderFragmentBlock('nextend_content'); ?> <!-- End Content --> </div> </div> </div> <?php N2Pluggable::doAction('afterApplicationContent'); ?> </div> <?php N2Message::show(); N2JS::addInline("new NextendExpertMode('smartslider', " . N2SSPRO . ");");
private function getFamily($family) { static $cache = array(); if (!isset($cache[$family])) { N2Pluggable::doAction('fontFamily', array($family)); $cache[$family] = ''; } return "'" . $family . "'"; }