@@ -17,8 +17,6 @@ |
||
| 17 | 17 | use Nette; |
| 18 | 18 | use Nette\Application; |
| 19 | 19 | use Nette\Forms; |
| 20 | -use Nette\Localization; |
|
| 21 | - |
|
| 22 | 20 | use IPub; |
| 23 | 21 | use IPub\ConfirmationDialog; |
| 24 | 22 | use IPub\ConfirmationDialog\Exceptions; |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Confirmer.php |
|
| 4 | - * |
|
| 5 | - * @copyright More in license.md |
|
| 6 | - * @license http://www.ipublikuj.eu |
|
| 7 | - * @author Adam Kadlec http://www.ipublikuj.eu |
|
| 8 | - * @package iPublikuj:ConfirmationDialog! |
|
| 9 | - * @subpackage Components |
|
| 10 | - * @since 5.0 |
|
| 11 | - * |
|
| 12 | - * @date 31.03.14 |
|
| 13 | - */ |
|
| 3 | + * Confirmer.php |
|
| 4 | + * |
|
| 5 | + * @copyright More in license.md |
|
| 6 | + * @license http://www.ipublikuj.eu |
|
| 7 | + * @author Adam Kadlec http://www.ipublikuj.eu |
|
| 8 | + * @package iPublikuj:ConfirmationDialog! |
|
| 9 | + * @subpackage Components |
|
| 10 | + * @since 5.0 |
|
| 11 | + * |
|
| 12 | + * @date 31.03.14 |
|
| 13 | + */ |
|
| 14 | 14 | |
| 15 | 15 | namespace IPub\ConfirmationDialog\Components; |
| 16 | 16 | |
@@ -183,7 +183,7 @@ |
||
| 183 | 183 | $template->name = $this->name; |
| 184 | 184 | $template->class = $this->cssClass; |
| 185 | 185 | $template->icon = $this->getIcon(); |
| 186 | - $template->question = $this->getQuestion(); |
|
| 186 | + $template->question = $this->getQuestion(); |
|
| 187 | 187 | $template->heading = $this->getHeading(); |
| 188 | 188 | $template->useAjax = $this->useAjax; |
| 189 | 189 | |
@@ -345,7 +345,7 @@ |
||
| 345 | 345 | } |
| 346 | 346 | |
| 347 | 347 | /** |
| 348 | - * @return array |
|
| 348 | + * @return callable |
|
| 349 | 349 | * |
| 350 | 350 | * @throws Exceptions\InvalidStateException |
| 351 | 351 | */ |
@@ -16,7 +16,6 @@ |
||
| 16 | 16 | |
| 17 | 17 | use Nette; |
| 18 | 18 | use Nette\Application; |
| 19 | - |
|
| 20 | 19 | use IPub; |
| 21 | 20 | use IPub\ConfirmationDialog; |
| 22 | 21 | use IPub\ConfirmationDialog\Exceptions; |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Confirmer.php |
|
| 4 | - * |
|
| 5 | - * @copyright More in license.md |
|
| 6 | - * @license http://www.ipublikuj.eu |
|
| 7 | - * @author Adam Kadlec http://www.ipublikuj.eu |
|
| 8 | - * @package iPublikuj:ConfirmationDialog! |
|
| 9 | - * @subpackage Components |
|
| 10 | - * @since 5.0 |
|
| 11 | - * |
|
| 12 | - * @date 31.03.14 |
|
| 13 | - */ |
|
| 3 | + * Confirmer.php |
|
| 4 | + * |
|
| 5 | + * @copyright More in license.md |
|
| 6 | + * @license http://www.ipublikuj.eu |
|
| 7 | + * @author Adam Kadlec http://www.ipublikuj.eu |
|
| 8 | + * @package iPublikuj:ConfirmationDialog! |
|
| 9 | + * @subpackage Components |
|
| 10 | + * @since 5.0 |
|
| 11 | + * |
|
| 12 | + * @date 31.03.14 |
|
| 13 | + */ |
|
| 14 | 14 | |
| 15 | 15 | namespace IPub\ConfirmationDialog\Components; |
| 16 | 16 | |
@@ -16,9 +16,7 @@ |
||
| 16 | 16 | |
| 17 | 17 | use Nette; |
| 18 | 18 | use Nette\Application; |
| 19 | -use Nette\Localization; |
|
| 20 | 19 | use Nette\Utils; |
| 21 | - |
|
| 22 | 20 | use IPub; |
| 23 | 21 | use IPub\ConfirmationDialog\Exceptions; |
| 24 | 22 | |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Control.php |
|
| 4 | - * |
|
| 5 | - * @copyright More in license.md |
|
| 6 | - * @license http://www.ipublikuj.eu |
|
| 7 | - * @author Adam Kadlec http://www.ipublikuj.eu |
|
| 8 | - * @package iPublikuj:ConfirmationDialog! |
|
| 9 | - * @subpackage Components |
|
| 10 | - * @since 5.0 |
|
| 11 | - * |
|
| 12 | - * @date 12.03.14 |
|
| 13 | - */ |
|
| 3 | + * Control.php |
|
| 4 | + * |
|
| 5 | + * @copyright More in license.md |
|
| 6 | + * @license http://www.ipublikuj.eu |
|
| 7 | + * @author Adam Kadlec http://www.ipublikuj.eu |
|
| 8 | + * @package iPublikuj:ConfirmationDialog! |
|
| 9 | + * @subpackage Components |
|
| 10 | + * @since 5.0 |
|
| 11 | + * |
|
| 12 | + * @date 12.03.14 |
|
| 13 | + */ |
|
| 14 | 14 | |
| 15 | 15 | namespace IPub\ConfirmationDialog\Components; |
| 16 | 16 | |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | public function getTemplateFile() |
| 114 | 114 | { |
| 115 | 115 | // ...try to get default component layout file |
| 116 | - return !empty($this->templateFile) ? $this->templateFile : __DIR__ . DIRECTORY_SEPARATOR .'template'. DIRECTORY_SEPARATOR .'default.latte'; |
|
| 116 | + return !empty($this->templateFile) ? $this->templateFile : __DIR__ . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . 'default.latte'; |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | /** |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | throw new Exceptions\InvalidArgumentException("Confirmation control name contain invalid characters."); |
| 153 | 153 | |
| 154 | 154 | // Check confirmer |
| 155 | - } else if ((!$confirmer = $this->getComponent('confirmer-'. $name)) || !$confirmer instanceof Confirmer || $confirmer->isConfigured()) { |
|
| 155 | + } else if ((!$confirmer = $this->getComponent('confirmer-' . $name)) || !$confirmer instanceof Confirmer || $confirmer->isConfigured()) { |
|
| 156 | 156 | throw new Exceptions\InvalidArgumentException("Confirmation control '$name' could not be created."); |
| 157 | 157 | |
| 158 | 158 | } else { |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | */ |
| 178 | 178 | public function getConfirmer($name) |
| 179 | 179 | { |
| 180 | - if ((!$confirmer = $this->getComponent('confirmer-'. $name)) || !$confirmer instanceof Confirmer || $confirmer->isConfigured()) { |
|
| 180 | + if ((!$confirmer = $this->getComponent('confirmer-' . $name)) || !$confirmer instanceof Confirmer || $confirmer->isConfigured()) { |
|
| 181 | 181 | throw new Exceptions\InvalidArgumentException("Confirmation control '$name' does not exists."); |
| 182 | 182 | } |
| 183 | 183 | |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | throw new Exceptions\InvalidArgumentException('$name must be string.'); |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | - if ((!$this->confirmer = $this['confirmer-'. $name]) || !$this->confirmer->isConfigured()) { |
|
| 244 | + if ((!$this->confirmer = $this['confirmer-' . $name]) || !$this->confirmer->isConfigured()) { |
|
| 245 | 245 | throw new Exceptions\InvalidStateException("Confirmer '$name' do not exist."); |
| 246 | 246 | } |
| 247 | 247 | |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | $name = Utils\Strings::substring($signal, 7); |
| 268 | 268 | $name{0} = strtolower($name{0}); |
| 269 | 269 | |
| 270 | - if (!$this['confirmer-'. $name]->isConfigured()) { |
|
| 270 | + if (!$this['confirmer-' . $name]->isConfigured()) { |
|
| 271 | 271 | throw new Exceptions\InvalidArgumentException('Invalid confirmation control.'); |
| 272 | 272 | } |
| 273 | 273 | |
@@ -16,8 +16,6 @@ |
||
| 16 | 16 | |
| 17 | 17 | use Nette; |
| 18 | 18 | use Nette\DI; |
| 19 | -use Nette\PhpGenerator as Code; |
|
| 20 | - |
|
| 21 | 19 | use IPub\ConfirmationDialog; |
| 22 | 20 | |
| 23 | 21 | class ConfirmationDialogExtension extends DI\CompilerExtension |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * ConfirmationDialogExtension.php |
|
| 4 | - * |
|
| 5 | - * @copyright More in license.md |
|
| 6 | - * @license http://www.ipublikuj.eu |
|
| 7 | - * @author Adam Kadlec http://www.ipublikuj.eu |
|
| 8 | - * @package iPublikuj:ConfirmationDialog! |
|
| 9 | - * @subpackage DI |
|
| 10 | - * @since 5.0 |
|
| 11 | - * |
|
| 12 | - * @date 08.06.14 |
|
| 13 | - */ |
|
| 3 | + * ConfirmationDialogExtension.php |
|
| 4 | + * |
|
| 5 | + * @copyright More in license.md |
|
| 6 | + * @license http://www.ipublikuj.eu |
|
| 7 | + * @author Adam Kadlec http://www.ipublikuj.eu |
|
| 8 | + * @package iPublikuj:ConfirmationDialog! |
|
| 9 | + * @subpackage DI |
|
| 10 | + * @since 5.0 |
|
| 11 | + * |
|
| 12 | + * @date 08.06.14 |
|
| 13 | + */ |
|
| 14 | 14 | |
| 15 | 15 | namespace IPub\ConfirmationDialog\DI; |
| 16 | 16 | |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | */ |
| 70 | 70 | public static function register(Nette\Configurator $config, $extensionName = 'confirmationDialog') |
| 71 | 71 | { |
| 72 | - $config->onCompile[] = function (Nette\Configurator $config, Nette\DI\Compiler $compiler) use ($extensionName) { |
|
| 72 | + $config->onCompile[] = function(Nette\Configurator $config, Nette\DI\Compiler $compiler) use ($extensionName) { |
|
| 73 | 73 | $compiler->addExtension($extensionName, new ConfirmationDialogExtension()); |
| 74 | 74 | }; |
| 75 | 75 | } |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * TConfirmationDialog.php |
|
| 4 | - * |
|
| 5 | - * @copyright More in license.md |
|
| 6 | - * @license http://www.ipublikuj.eu |
|
| 7 | - * @author Adam Kadlec http://www.ipublikuj.eu |
|
| 8 | - * @package iPublikuj:ConfirmationDialog! |
|
| 9 | - * @subpackage common |
|
| 10 | - * @since 5.0 |
|
| 11 | - * |
|
| 12 | - * @date 01.02.15 |
|
| 13 | - */ |
|
| 3 | + * TConfirmationDialog.php |
|
| 4 | + * |
|
| 5 | + * @copyright More in license.md |
|
| 6 | + * @license http://www.ipublikuj.eu |
|
| 7 | + * @author Adam Kadlec http://www.ipublikuj.eu |
|
| 8 | + * @package iPublikuj:ConfirmationDialog! |
|
| 9 | + * @subpackage common |
|
| 10 | + * @since 5.0 |
|
| 11 | + * |
|
| 12 | + * @date 01.02.15 |
|
| 13 | + */ |
|
| 14 | 14 | |
| 15 | 15 | namespace IPub\ConfirmationDialog; |
| 16 | 16 | |
@@ -30,7 +30,8 @@ |
||
| 30 | 30 | /** |
| 31 | 31 | * @param Components\IControl $confirmationDialogFactory |
| 32 | 32 | */ |
| 33 | - public function injectConfirmationDialog(Components\IControl $confirmationDialogFactory) { |
|
| 33 | + public function injectConfirmationDialog(Components\IControl $confirmationDialogFactory) |
|
| 34 | + { |
|
| 34 | 35 | $this->confirmationDialogFactory = $confirmationDialogFactory; |
| 35 | 36 | } |
| 36 | 37 | } |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * BaseControl.php |
|
| 4 | - * |
|
| 5 | - * @copyright More in license.md |
|
| 6 | - * @license http://www.ipublikuj.eu |
|
| 7 | - * @author Adam Kadlec http://www.ipublikuj.eu |
|
| 8 | - * @package iPublikuj:ConfirmationDialog! |
|
| 9 | - * @subpackage Components |
|
| 10 | - * @since 5.0 |
|
| 11 | - * |
|
| 12 | - * @date 12.03.14 |
|
| 13 | - */ |
|
| 3 | + * BaseControl.php |
|
| 4 | + * |
|
| 5 | + * @copyright More in license.md |
|
| 6 | + * @license http://www.ipublikuj.eu |
|
| 7 | + * @author Adam Kadlec http://www.ipublikuj.eu |
|
| 8 | + * @package iPublikuj:ConfirmationDialog! |
|
| 9 | + * @subpackage Components |
|
| 10 | + * @since 5.0 |
|
| 11 | + * |
|
| 12 | + * @date 12.03.14 |
|
| 13 | + */ |
|
| 14 | 14 | |
| 15 | 15 | namespace IPub\ConfirmationDialog\Components; |
| 16 | 16 | |
@@ -31,8 +31,8 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | abstract class BaseControl extends Application\UI\Control |
| 33 | 33 | { |
| 34 | - const TEMPLATE_LAYOUT = 'layout'; |
|
| 35 | - const TEMPLATE_CONFIRMER = 'template'; |
|
| 34 | + const TEMPLATE_LAYOUT = 'layout'; |
|
| 35 | + const TEMPLATE_CONFIRMER = 'template'; |
|
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | 38 | * @var null|string |
@@ -80,11 +80,11 @@ discard block |
||
| 80 | 80 | $dir = dirname($this->getReflection()->getFileName()); |
| 81 | 81 | |
| 82 | 82 | // ...check if extension template is used |
| 83 | - if (is_file($dir . DIRECTORY_SEPARATOR .'template'. DIRECTORY_SEPARATOR . $templateFile)) { |
|
| 83 | + if (is_file($dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateFile)) { |
|
| 84 | 84 | $templateFile = $dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateFile; |
| 85 | 85 | |
| 86 | - } else if (is_file($dir . DIRECTORY_SEPARATOR .'template'. DIRECTORY_SEPARATOR . $templateFile .'.latte')) { |
|
| 87 | - $templateFile = $dir . DIRECTORY_SEPARATOR .'template'. DIRECTORY_SEPARATOR . $templateFile .'.latte'; |
|
| 86 | + } else if (is_file($dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateFile . '.latte')) { |
|
| 87 | + $templateFile = $dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateFile . '.latte'; |
|
| 88 | 88 | |
| 89 | 89 | } else { |
| 90 | 90 | // ...if not throw exception |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * IControl.php |
|
| 4 | - * |
|
| 5 | - * @copyright More in license.md |
|
| 6 | - * @license http://www.ipublikuj.eu |
|
| 7 | - * @author Adam Kadlec http://www.ipublikuj.eu |
|
| 8 | - * @package iPublikuj:ConfirmationDialog! |
|
| 9 | - * @subpackage Components |
|
| 10 | - * @since 5.0 |
|
| 11 | - * |
|
| 12 | - * @date 12.03.14 |
|
| 13 | - */ |
|
| 3 | + * IControl.php |
|
| 4 | + * |
|
| 5 | + * @copyright More in license.md |
|
| 6 | + * @license http://www.ipublikuj.eu |
|
| 7 | + * @author Adam Kadlec http://www.ipublikuj.eu |
|
| 8 | + * @package iPublikuj:ConfirmationDialog! |
|
| 9 | + * @subpackage Components |
|
| 10 | + * @since 5.0 |
|
| 11 | + * |
|
| 12 | + * @date 12.03.14 |
|
| 13 | + */ |
|
| 14 | 14 | |
| 15 | 15 | namespace IPub\ConfirmationDialog\Components; |
| 16 | 16 | |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * IConfirmer.php |
|
| 4 | - * |
|
| 5 | - * @copyright More in license.md |
|
| 6 | - * @license http://www.ipublikuj.eu |
|
| 7 | - * @author Adam Kadlec http://www.ipublikuj.eu |
|
| 8 | - * @package iPublikuj:ConfirmationDialog! |
|
| 9 | - * @subpackage Components |
|
| 10 | - * @since 5.0 |
|
| 11 | - * |
|
| 12 | - * @date 31.01.15 |
|
| 13 | - */ |
|
| 3 | + * IConfirmer.php |
|
| 4 | + * |
|
| 5 | + * @copyright More in license.md |
|
| 6 | + * @license http://www.ipublikuj.eu |
|
| 7 | + * @author Adam Kadlec http://www.ipublikuj.eu |
|
| 8 | + * @package iPublikuj:ConfirmationDialog! |
|
| 9 | + * @subpackage Components |
|
| 10 | + * @since 5.0 |
|
| 11 | + * |
|
| 12 | + * @date 31.01.15 |
|
| 13 | + */ |
|
| 14 | 14 | |
| 15 | 15 | namespace IPub\ConfirmationDialog\Components; |
| 16 | 16 | |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * IException.php |
|
| 4 | - * |
|
| 5 | - * @copyright More in license.md |
|
| 6 | - * @license http://www.ipublikuj.eu |
|
| 7 | - * @author Adam Kadlec http://www.ipublikuj.eu |
|
| 8 | - * @package iPublikuj:ConfirmationDialog! |
|
| 9 | - * @subpackage Exceptions |
|
| 10 | - * @since 5.0 |
|
| 11 | - * |
|
| 12 | - * @date 31.01.15 |
|
| 13 | - */ |
|
| 3 | + * IException.php |
|
| 4 | + * |
|
| 5 | + * @copyright More in license.md |
|
| 6 | + * @license http://www.ipublikuj.eu |
|
| 7 | + * @author Adam Kadlec http://www.ipublikuj.eu |
|
| 8 | + * @package iPublikuj:ConfirmationDialog! |
|
| 9 | + * @subpackage Exceptions |
|
| 10 | + * @since 5.0 |
|
| 11 | + * |
|
| 12 | + * @date 31.01.15 |
|
| 13 | + */ |
|
| 14 | 14 | |
| 15 | 15 | namespace IPub\ConfirmationDialog\Exceptions; |
| 16 | 16 | |
@@ -14,4 +14,6 @@ |
||
| 14 | 14 | |
| 15 | 15 | namespace IPub\ConfirmationDialog\Exceptions; |
| 16 | 16 | |
| 17 | -interface IException {} |
|
| 18 | 17 | \ No newline at end of file |
| 18 | +interface IException |
|
| 19 | +{ |
|
| 20 | +} |
|
| 19 | 21 | \ No newline at end of file |