Permalink
Browse files

Code formatting, ignore Netbeans files

  • Loading branch information...
szymek committed Dec 7, 2011
1 parent 0e90dd8 commit 7490ad1d323623e801454eb0e4a0e15588e75023
Showing with 21 additions and 11 deletions.
  1. +1 −0 .gitignore
  2. +20 −11 Twig/Extension/BarcodeRenderExtension.php
View
@@ -1 +1,2 @@
vendor/
+/nbproject/
@@ -1,4 +1,5 @@
<?php
+
/**
* Twig extension for barcodes
*
@@ -11,40 +12,48 @@
use Mopa\BarcodeBundle\Model\BarcodeService;
-class BarcodeRenderExtension extends \Twig_Extension {
-
+class BarcodeRenderExtension extends \Twig_Extension
+{
+
protected $bs;
+
/**
* @param \Knp\Menu\Twig\Helper $helper
*/
public function __construct(BarcodeService $bs)
{
$this->bs = $bs;
}
+
/**
* {@inheritDoc}
*/
- public function getName() {
+ public function getName()
+ {
return 'mopa_barcode_render';
}
-
+
public function getFunctions()
{
return array(
'mopa_barcode_url' => new \Twig_Function_Method($this, 'url'),
- 'mopa_barcode_path' => new \Twig_Function_Method($this, 'path'),
+ 'mopa_barcode_path' => new \Twig_Function_Method($this, 'path'),
);
}
- public function url($type, $text) {
+ public function url($type, $text)
+ {
return $this->get($type, $text, false);
}
- public function path($type, $text) {
+ public function path($type, $text)
+ {
return $this->get($type, $text, true);
}
-
- protected function get($type, $text, $absolute) {
- return $this->bs->get($type, urlencode($text), $absolute);
- }
+
+ protected function get($type, $text, $absolute)
+ {
+ return $this->bs->get($type, urlencode($text), $absolute);
+ }
+
}

0 comments on commit 7490ad1

Please sign in to comment.