Skip to content

Commit

Permalink
Don't render empty console banners
Browse files Browse the repository at this point in the history
This change will allow modules to provide the console banner
information dynamically and returning an empty string when nothing
should be rendered. 

A module can now check the environment and capabilities before returning
the information.

This was missing in the last commit
  • Loading branch information
tux-rampage committed Apr 23, 2013
1 parent 9d306a3 commit 9799ad6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion library/Zend/Mvc/View/Console/RouteNotFoundStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,14 @@ protected function getConsoleBanner(ConsoleAdapter $console, ModuleManagerInterf
continue; // this module does not provide a banner
}

// Don't render empty completely empty lines
$banner = $module->getConsoleBanner($console);
if ($banner == '') {
continue;
}

// We colorize each banners in blue for visual emphasis
$banners[] = $console->colorize($module->getConsoleBanner($console), ColorInterface::BLUE);
$banners[] = $console->colorize($banner, ColorInterface::BLUE);
}
}

Expand Down

0 comments on commit 9799ad6

Please sign in to comment.