예제 #1
0
 public function __construct($cssClasses = null)
 {
     if ($cssClasses === null) {
         $cssClasses = array('success' => 'alert alert-success', 'notice' => 'alert alert-info', 'warning' => 'alert alert-warning', 'error' => 'alert alert-danger');
     }
     parent::__construct($cssClasses);
 }
예제 #2
0
use Phalcon\Events\Manager as EventsManager;
use Phalcon\Mvc\Model\Metadata\Memory as MetaDataAdapter;
use Phalcon\Session\Adapter\Files as SessionAdapter;
use Phalcon\Flash\Session as flash;
use Phalcon\Assets\Manager;
/**
 * The FactoryDefault Dependency Injector automatically register the right services providing a full stack framework
 */
$di = new FactoryDefault();
$di->set('router', function () {
    $router = new Router();
    $router->setUriSource(Router::URI_SOURCE_SERVER_REQUEST_URI);
    return $router;
});
$di->set('flash', function () {
    $flash = new flash();
    $flash->setCssclasses(array('success' => 'alert alert-success', 'warning' => 'alert alert-warning', 'error' => 'alert alert-danger'));
    return $flash;
});
$di->set('assets', function () use($config) {
    $manager = new Manager();
    foreach ($config->vendorAssets as $k => $v) {
        if ($k == 'css') {
            foreach ($v as $alias => $file) {
                $manager->collection('css')->addCss($file);
            }
        } else {
            foreach ($v as $alias => $file) {
                $manager->collection('js')->addJs($file);
            }
        }
예제 #3
0
파일: Session.php 프로젝트: lisong/cphalcon
 public function outputMessage($type, $message)
 {
     return parent::outputMessage($type, $message);
 }
예제 #4
0
 public function __construct()
 {
     parent::__construct(['notice' => 'alert alert-info', 'success' => 'alert alert-success', 'warning' => 'alert alert-warning', 'error' => 'alert alert-danger']);
 }