Skip to content

Commit

Permalink
WidgetsExtension: Rename tag constant.
Browse files Browse the repository at this point in the history
  • Loading branch information
pepakriz committed May 12, 2014
1 parent 3ef935d commit e137df4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Widgets/DI/WidgetsExtension.php
Expand Up @@ -19,7 +19,7 @@
class WidgetsExtension extends CompilerExtension
{

const WIDGET_TAG = 'venne.widget';
const TAG_WIDGET = 'venne.widget';


public function loadConfiguration()
Expand All @@ -39,9 +39,9 @@ public function beforeCompile()
$container = $this->getContainerBuilder();
$config = $container->getDefinition($this->prefix('widgetManager'));

foreach ($container->findByTag(static::WIDGET_TAG) as $factory => $meta) {
foreach ($container->findByTag(static::TAG_WIDGET) as $factory => $meta) {
if (!is_string($meta)) {
throw new \Nette\InvalidArgumentException("Tag " . static::WIDGET_TAG . " require name. Provide it in configuration. (tags: [venne.widget: name])");
throw new \Nette\InvalidArgumentException("Tag " . static::TAG_WIDGET . " require name. Provide it in configuration. (tags: [venne.widget: name])");
}
$config->addSetup('addWidget', array($meta, $factory));
}
Expand Down

0 comments on commit e137df4

Please sign in to comment.