コード例 #1
0
 public function run(JsUtils $js)
 {
     $this->_bsComponent = $js->bootstrap()->carousel("#" . $this->identifier);
     $this->addEventsOnRun($js);
     return $this->_bsComponent;
 }
コード例 #2
0
        $volt->setOptions(array('compiledPath' => $config->application->cacheDir, 'compiledSeparator' => '_'));
        return $volt;
    }, '.phtml' => 'Phalcon\\Mvc\\View\\Engine\\Php'));
    return $view;
}, true);
/**
 * Database connection is created based in the parameters defined in the configuration file
 */
$di->set('db', function () use($config) {
    return new DbAdapter(array('host' => $config->database->host, 'username' => $config->database->username, 'password' => $config->database->password, 'dbname' => $config->database->dbname, 'options' => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')));
});
/**
 * If the configuration specify the use of metadata adapter use it or use memory otherwise
 */
$di->set('modelsMetadata', function () {
    return new MetaDataAdapter();
});
/**
 * Start the session the first time some component request the session service
 */
$di->set('session', function () {
    $session = new SessionAdapter();
    $session->start();
    return $session;
});
$di->set("jquery", function () {
    $jquery = new JsUtils(array("driver" => "Jquery"));
    $jquery->bootstrap(new Bootstrap());
    //for Twitter Bootstrap
    return $jquery;
});
コード例 #3
0
 /**
  * Js component creation when dropdownItem is in Navs/Pills
  * @param JsUtils $js
  */
 public function runNav(JsUtils $js)
 {
     $js->bootstrap()->tab("#" . $this->identifier);
 }
コード例 #4
0
 public function run(JsUtils $js)
 {
     $this->_bsComponent = $js->bootstrap()->generic("#" . $this->identifier);
     if (array_key_exists("data-toggle", $this->properties)) {
         $this->_bsComponent->addCode("\$.fn.toggled=function(){return this.hasClass('active');};");
     }
     $this->addEventsOnRun($js);
     return $this->_bsComponent;
 }
コード例 #5
0
 public function run(JsUtils $js)
 {
     $this->_bsComponent = $js->bootstrap()->collapse("#" . $this->element->getIdentifier());
     $this->addEventsOnRun($js);
     return $this->_bsComponent;
 }
コード例 #6
0
ファイル: HtmlPanel.php プロジェクト: jcheron/phalcon-jquery
 public function run(JsUtils $js)
 {
     if ($this->_collapsable) {
         $this->_bsComponent = $js->bootstrap()->collapse("#lnk-" . $this->identifier);
         $this->_bsComponent->setCollapsed("#collapse-" . $this->identifier);
         if ($this->_showOnStartup === true) {
             $this->_bsComponent->show();
         }
     }
     return $this->_bsComponent;
 }