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); }
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); } }
public function outputMessage($type, $message) { return parent::outputMessage($type, $message); }
public function __construct() { parent::__construct(['notice' => 'alert alert-info', 'success' => 'alert alert-success', 'warning' => 'alert alert-warning', 'error' => 'alert alert-danger']); }