@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | { |
| 29 | 29 | $this->template->driver = $this->driver; |
| 30 | 30 | $this->template->actualDatabase = $this->database; |
| 31 | - $this->template->setFile(__DIR__ . '/default.latte'); |
|
| 31 | + $this->template->setFile(__DIR__.'/default.latte'); |
|
| 32 | 32 | $this->template->render(); |
| 33 | 33 | } |
| 34 | 34 | |
@@ -38,9 +38,9 @@ discard block |
||
| 38 | 38 | sort($databases); |
| 39 | 39 | $form = new Form(); |
| 40 | 40 | $form->setRenderer(new BootstrapVerticalRenderer()); |
| 41 | - $form->addSelect('database', $this->translator->translate($this->driver->type() . '.database_select_control.database.label'), array_combine($databases, $databases)) |
|
| 42 | - ->setPrompt($this->translator->translate($this->driver->type() . '.database_select_control.database.prompt')) |
|
| 43 | - ->setAttribute('onchange', 'window.location = \'' . $this->presenter->link('Table:default', $this->driver->type()) . '&database=\' + this.value') |
|
| 41 | + $form->addSelect('database', $this->translator->translate($this->driver->type().'.database_select_control.database.label'), array_combine($databases, $databases)) |
|
| 42 | + ->setPrompt($this->translator->translate($this->driver->type().'.database_select_control.database.prompt')) |
|
| 43 | + ->setAttribute('onchange', 'window.location = \''.$this->presenter->link('Table:default', $this->driver->type()).'&database=\' + this.value') |
|
| 44 | 44 | ->setDefaultValue($this->database); |
| 45 | 45 | return $form; |
| 46 | 46 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -$container = require __DIR__ . '/../app/bootstrap.php'; |
|
| 3 | +$container = require __DIR__.'/../app/bootstrap.php'; |
|
| 4 | 4 | |
| 5 | 5 | $container->getService('application')->run(); |
@@ -13,6 +13,9 @@ |
||
| 13 | 13 | |
| 14 | 14 | private $queue; |
| 15 | 15 | |
| 16 | + /** |
|
| 17 | + * @param string $queue |
|
| 18 | + */ |
|
| 16 | 19 | public function __construct(AMQPStreamConnection $connection, $queue = null) |
| 17 | 20 | { |
| 18 | 21 | $this->connection = $connection; |
@@ -15,6 +15,9 @@ |
||
| 15 | 15 | |
| 16 | 16 | private $member; |
| 17 | 17 | |
| 18 | + /** |
|
| 19 | + * @param string $key |
|
| 20 | + */ |
|
| 18 | 21 | public function __construct(RedisProxy $connection, $key, $member) |
| 19 | 22 | { |
| 20 | 23 | $this->connection = $connection; |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | $tableForm->addFieldsToForm($form); |
| 50 | 50 | $form->addSubmit('save', 'Save'); |
| 51 | 51 | $form->onSuccess[] = [$tableForm, 'submit']; |
| 52 | - $form->onSuccess[] = function () { |
|
| 52 | + $form->onSuccess[] = function() { |
|
| 53 | 53 | $this->presenter->redirect('Table:default', $this->driver->type(), $this->database); |
| 54 | 54 | }; |
| 55 | 55 | return $form; |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | $tableForm->addFieldsToForm($form); |
| 50 | 50 | $form->addSubmit('save', 'Save'); |
| 51 | 51 | $form->onSuccess[] = [$tableForm, 'submit']; |
| 52 | - $form->onSuccess[] = function () { |
|
| 52 | + $form->onSuccess[] = function() { |
|
| 53 | 53 | $this->presenter->redirect('Table:default', $this->driver->type(), $this->database); |
| 54 | 54 | }; |
| 55 | 55 | return $form; |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | $this->template->type = $this->type; |
| 34 | 34 | $this->template->table = $this->table; |
| 35 | 35 | $this->template->item = $this->item; |
| 36 | - $this->template->setFile(__DIR__ . '/default.latte'); |
|
| 36 | + $this->template->setFile(__DIR__.'/default.latte'); |
|
| 37 | 37 | $this->template->render(); |
| 38 | 38 | } |
| 39 | 39 | } |
@@ -5,30 +5,30 @@ |
||
| 5 | 5 | use RadekDostal\NetteComponents\DateTimePicker\TbDatePicker; |
| 6 | 6 | use RadekDostal\NetteComponents\DateTimePicker\TbDateTimePicker; |
| 7 | 7 | |
| 8 | -require __DIR__ . '/../vendor/autoload.php'; |
|
| 8 | +require __DIR__.'/../vendor/autoload.php'; |
|
| 9 | 9 | |
| 10 | 10 | umask(0); |
| 11 | 11 | |
| 12 | 12 | $configurator = new Configurator(); |
| 13 | 13 | |
| 14 | 14 | $host = filter_input(INPUT_SERVER, 'HTTP_HOST'); |
| 15 | -$debug = (bool)preg_match('/localhost|devel/', $host); |
|
| 15 | +$debug = (bool) preg_match('/localhost|devel/', $host); |
|
| 16 | 16 | |
| 17 | 17 | $configurator->setDebugMode($debug); |
| 18 | -$configurator->enableDebugger(__DIR__ . '/../log'); |
|
| 19 | -$configurator->setTempDirectory(__DIR__ . '/../temp'); |
|
| 18 | +$configurator->enableDebugger(__DIR__.'/../log'); |
|
| 19 | +$configurator->setTempDirectory(__DIR__.'/../temp'); |
|
| 20 | 20 | |
| 21 | -$configurator->addConfig(__DIR__ . '/config/config.neon'); |
|
| 21 | +$configurator->addConfig(__DIR__.'/config/config.neon'); |
|
| 22 | 22 | $container = $configurator->createContainer(); |
| 23 | 23 | |
| 24 | -Form::extensionMethod('addDatePicker', function (Form $form, $name, $label, $maxLength = null) { |
|
| 24 | +Form::extensionMethod('addDatePicker', function(Form $form, $name, $label, $maxLength = null) { |
|
| 25 | 25 | $datePicker = new TbDatePicker($label, $maxLength); |
| 26 | 26 | $datePicker->setFormat('Y-m-d'); |
| 27 | 27 | $datePicker->setAttribute('class', 'datepicker'); |
| 28 | 28 | return $form[$name] = $datePicker; |
| 29 | 29 | }); |
| 30 | 30 | |
| 31 | -Form::extensionMethod('addDateTimePicker', function (Form $form, $name, $label, $maxLength = null) { |
|
| 31 | +Form::extensionMethod('addDateTimePicker', function(Form $form, $name, $label, $maxLength = null) { |
|
| 32 | 32 | $dateTimePicker = new TbDateTimePicker($label, $maxLength); |
| 33 | 33 | $dateTimePicker->setFormat('Y-m-d H:i:s'); |
| 34 | 34 | $dateTimePicker->setAttribute('class', 'datetimepicker'); |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | ini_set('display_errors', 1); |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | -require __DIR__ . '/../vendor/autoload.php'; |
|
| 13 | +require __DIR__.'/../vendor/autoload.php'; |
|
| 14 | 14 | |
| 15 | 15 | umask(0); |
| 16 | 16 | |
@@ -18,23 +18,23 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | $configurator->setDebugMode(false); |
| 20 | 20 | |
| 21 | -$tempDir = sys_get_temp_dir() . '/adminerng/temp'; |
|
| 21 | +$tempDir = sys_get_temp_dir().'/adminerng/temp'; |
|
| 22 | 22 | if (!file_exists($tempDir)) { |
| 23 | 23 | mkdir($tempDir, 0777, true); |
| 24 | 24 | } |
| 25 | 25 | $configurator->setTempDirectory($tempDir); |
| 26 | 26 | |
| 27 | -$configurator->addConfig(__DIR__ . '/config/config.neon'); |
|
| 27 | +$configurator->addConfig(__DIR__.'/config/config.neon'); |
|
| 28 | 28 | $container = $configurator->createContainer(); |
| 29 | 29 | |
| 30 | -Form::extensionMethod('addDatePicker', function (Form $form, $name, $label, $maxLength = null) { |
|
| 30 | +Form::extensionMethod('addDatePicker', function(Form $form, $name, $label, $maxLength = null) { |
|
| 31 | 31 | $datePicker = new TbDatePicker($label, $maxLength); |
| 32 | 32 | $datePicker->setFormat('Y-m-d'); |
| 33 | 33 | $datePicker->setAttribute('class', 'datepicker'); |
| 34 | 34 | return $form[$name] = $datePicker; |
| 35 | 35 | }); |
| 36 | 36 | |
| 37 | -Form::extensionMethod('addDateTimePicker', function (Form $form, $name, $label, $maxLength = null) { |
|
| 37 | +Form::extensionMethod('addDateTimePicker', function(Form $form, $name, $label, $maxLength = null) { |
|
| 38 | 38 | $dateTimePicker = new TbDateTimePicker($label, $maxLength); |
| 39 | 39 | $dateTimePicker->setFormat('Y-m-d H:i:s'); |
| 40 | 40 | $dateTimePicker->setAttribute('class', 'datetimepicker'); |