Have you ever found yourself wondering if you are staring at your development, test or your production app in your browser? If you have, now you can try the AMAZING ENVIRONMENT INDICATOR. It was inspired by Drupal's Environment Indicator.
Requirements ¶
It should work with the 1.1 branch, but only tested on 1.1.7
Usage ¶
Put it in the extensions folder. That's pretty much it ...
// by default the color is set to #006400 and the position is `left` (could be `right`)
// you wanna put it probably in your main layout file with some IF statements ...
if( YII_DEBUG )
{
$this->widget( 'ext.environmentindicator.ei', array( 'text' => 'DEV ENVIRONMENT' ) );
}
else
{
if( ! Yii::app()->user->isGuest )
{
$this->widget( 'ext.environmentindicator.ei', array( 'text' => 'PRODUCTION ENVIRONMENT', 'color' => '#f00', 'position' => 'left' ) );
}
}
DEMO ¶
Click here to see the Environment Indicator in action!
Combine extensions!
Very handy in combination with Environment extension :)
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.