@@ -47,7 +47,7 @@ |
||
47 | 47 | */ |
48 | 48 | protected function addExtension($name, $class) |
49 | 49 | { |
50 | - Nette\Forms\Container::extensionMethod($name, function (Nette\Forms\Container $container, $name, $label = NULL) use ($class){ |
|
50 | + Nette\Forms\Container::extensionMethod($name, function(Nette\Forms\Container $container, $name, $label = NULL) use ($class){ |
|
51 | 51 | return $container[$name] = new $class($label); |
52 | 52 | }); |
53 | 53 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $config = $this->getConfig($this->defaults); |
44 | 44 | $builder = $this->getContainerBuilder(); |
45 | 45 | |
46 | - foreach($config as $name => $definition) { |
|
46 | + foreach ($config as $name => $definition) { |
|
47 | 47 | Utils\Validators::assertField($definition, 'factory', 'string'); |
48 | 48 | |
49 | 49 | $factory = $builder->addDefinition($this->prefix($name)) |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public static function register(Nette\Configurator $config, $extensionName = 'extendedForms') |
77 | 77 | { |
78 | - $config->onCompile[] = function (Nette\Configurator $config, Nette\DI\Compiler $compiler) use ($extensionName) { |
|
78 | + $config->onCompile[] = function(Nette\Configurator $config, Nette\DI\Compiler $compiler) use ($extensionName) { |
|
79 | 79 | $compiler->addExtension($extensionName, new FormsExtension()); |
80 | 80 | }; |
81 | 81 | } |
@@ -29,10 +29,10 @@ |
||
29 | 29 | */ |
30 | 30 | public function attach(Application\UI\Form $form) |
31 | 31 | { |
32 | - $form->onSubmit[] = [$this, 'submit']; |
|
33 | - $form->onSuccess[] = [$this, 'success']; |
|
34 | - $form->onError[] = [$this, 'error']; |
|
35 | - $form->onValidate[] = [$this, 'validate']; |
|
32 | + $form->onSubmit[] = [$this, 'submit']; |
|
33 | + $form->onSuccess[] = [$this, 'success']; |
|
34 | + $form->onError[] = [$this, 'error']; |
|
35 | + $form->onValidate[] = [$this, 'validate']; |
|
36 | 36 | |
37 | 37 | return $this; |
38 | 38 | } |
@@ -63,7 +63,7 @@ |
||
63 | 63 | public function setFormClass($className) |
64 | 64 | { |
65 | 65 | if (!class_exists($className)) { |
66 | - throw new Exceptions\InvalidArgumentException('Provided form class name "'. $className .'" doesn\'t exists.'); |
|
66 | + throw new Exceptions\InvalidArgumentException('Provided form class name "' . $className . '" doesn\'t exists.'); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | $this->formClassName = $className; |