add new event and new tag
This commit is contained in:
@@ -33,6 +33,11 @@ namespace Thelia\Core\Event;
|
||||
final class TheliaEvents
|
||||
{
|
||||
|
||||
/**
|
||||
* sent at the beginning
|
||||
*/
|
||||
const BOOT = "thelia.boot";
|
||||
|
||||
/**
|
||||
* ACTION event
|
||||
*
|
||||
|
||||
@@ -39,6 +39,7 @@ use Symfony\Component\Yaml\Yaml;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
|
||||
|
||||
use Thelia\Core\Bundle;
|
||||
use Thelia\Core\Event\TheliaEvents;
|
||||
use Thelia\Log\Tlog;
|
||||
use Thelia\Config\DatabaseConfiguration;
|
||||
use Thelia\Config\DefinePropel;
|
||||
@@ -88,6 +89,16 @@ class Thelia extends Kernel
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* dispatch an event when application is boot
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
$this->getContainer()->get("event_dispatcher")->dispatch(TheliaEvents::BOOT);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Load some configuration
|
||||
|
||||
@@ -56,7 +56,7 @@ class PropelCollector extends DataCollector implements Renderable, LoggerInterfa
|
||||
*/
|
||||
function getName()
|
||||
{
|
||||
// TODO: Implement getName() method.
|
||||
return "Propel 2";
|
||||
}
|
||||
|
||||
public function getWidgets()
|
||||
@@ -73,4 +73,124 @@ class PropelCollector extends DataCollector implements Renderable, LoggerInterfa
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* System is unusable.
|
||||
*
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @return null
|
||||
*/
|
||||
public function emergency($message, array $context = array())
|
||||
{
|
||||
// TODO: Implement emergency() method.
|
||||
}
|
||||
|
||||
/**
|
||||
* Action must be taken immediately.
|
||||
*
|
||||
* Example: Entire website down, database unavailable, etc. This should
|
||||
* trigger the SMS alerts and wake you up.
|
||||
*
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @return null
|
||||
*/
|
||||
public function alert($message, array $context = array())
|
||||
{
|
||||
// TODO: Implement alert() method.
|
||||
}
|
||||
|
||||
/**
|
||||
* Critical conditions.
|
||||
*
|
||||
* Example: Application component unavailable, unexpected exception.
|
||||
*
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @return null
|
||||
*/
|
||||
public function critical($message, array $context = array())
|
||||
{
|
||||
// TODO: Implement critical() method.
|
||||
}
|
||||
|
||||
/**
|
||||
* Runtime errors that do not require immediate action but should typically
|
||||
* be logged and monitored.
|
||||
*
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @return null
|
||||
*/
|
||||
public function error($message, array $context = array())
|
||||
{
|
||||
// TODO: Implement error() method.
|
||||
}
|
||||
|
||||
/**
|
||||
* Exceptional occurrences that are not errors.
|
||||
*
|
||||
* Example: Use of deprecated APIs, poor use of an API, undesirable things
|
||||
* that are not necessarily wrong.
|
||||
*
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @return null
|
||||
*/
|
||||
public function warning($message, array $context = array())
|
||||
{
|
||||
// TODO: Implement warning() method.
|
||||
}
|
||||
|
||||
/**
|
||||
* Normal but significant events.
|
||||
*
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @return null
|
||||
*/
|
||||
public function notice($message, array $context = array())
|
||||
{
|
||||
// TODO: Implement notice() method.
|
||||
}
|
||||
|
||||
/**
|
||||
* Interesting events.
|
||||
*
|
||||
* Example: User logs in, SQL logs.
|
||||
*
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @return null
|
||||
*/
|
||||
public function info($message, array $context = array())
|
||||
{
|
||||
// TODO: Implement info() method.
|
||||
}
|
||||
|
||||
/**
|
||||
* Detailed debug information.
|
||||
*
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @return null
|
||||
*/
|
||||
public function debug($message, array $context = array())
|
||||
{
|
||||
// TODO: Implement debug() method.
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs with an arbitrary level.
|
||||
*
|
||||
* @param mixed $level
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @return null
|
||||
*/
|
||||
public function log($level, $message, array $context = array())
|
||||
{
|
||||
// TODO: Implement log() method.
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,8 @@
|
||||
<link rel="stylesheet" href="{$asset_url}">
|
||||
{/stylesheets}
|
||||
|
||||
{debugbar_renderHead}
|
||||
|
||||
{block name="after-bootstrap-css"}{/block}
|
||||
|
||||
{* -- Admin CSS section ------------------------------------------------- *}
|
||||
@@ -221,7 +223,7 @@
|
||||
{/javascripts}
|
||||
|
||||
{block name="javascript-initialization"}{/block}
|
||||
|
||||
{debugbar_render}
|
||||
{* Modules scripts are included now *}
|
||||
{module_include location='footer_js'}
|
||||
</body>
|
||||
|
||||
@@ -13,6 +13,6 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{debugbar_render}
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,6 +7,7 @@
|
||||
{stylesheets file='../assets/css/*' filters='less,cssembed'}
|
||||
<link rel="stylesheet" href="{$asset_url}">
|
||||
{/stylesheets}
|
||||
{debugbar_renderHead}
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user