@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | /** |
| 408 | 408 | * Get or set rules. |
| 409 | 409 | * |
| 410 | - * @param null $rules |
|
| 410 | + * @param string $rules |
|
| 411 | 411 | * @param array $messages |
| 412 | 412 | * |
| 413 | 413 | * @return $this |
@@ -650,7 +650,7 @@ discard block |
||
| 650 | 650 | * Add html attributes to elements. |
| 651 | 651 | * |
| 652 | 652 | * @param array|string $attribute |
| 653 | - * @param mixed $value |
|
| 653 | + * @param boolean|string $value |
|
| 654 | 654 | * |
| 655 | 655 | * @return $this |
| 656 | 656 | */ |
@@ -906,7 +906,7 @@ |
||
| 906 | 906 | */ |
| 907 | 907 | public function popover($title = null, $content) |
| 908 | 908 | { |
| 909 | - return $this->attribute([ |
|
| 909 | + return $this->attribute([ |
|
| 910 | 910 | 'data-popover-title' => $title, |
| 911 | 911 | 'data-popover' => $content, |
| 912 | 912 | ]); |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | * Get or set option for grid. |
| 230 | 230 | * |
| 231 | 231 | * @param string $key |
| 232 | - * @param mixed $value |
|
| 232 | + * @param boolean $value |
|
| 233 | 233 | * |
| 234 | 234 | * @return $this|mixed |
| 235 | 235 | */ |
@@ -286,6 +286,9 @@ discard block |
||
| 286 | 286 | return $column; |
| 287 | 287 | } |
| 288 | 288 | |
| 289 | + /** |
|
| 290 | + * @return string |
|
| 291 | + */ |
|
| 289 | 292 | public function setLabel($label , $relationColumn) |
| 290 | 293 | { |
| 291 | 294 | $trans_key = 'validation.attributes.' . $relationColumn; |
@@ -374,7 +377,7 @@ discard block |
||
| 374 | 377 | /** |
| 375 | 378 | * Get the grid paginator. |
| 376 | 379 | * |
| 377 | - * @return mixed |
|
| 380 | + * @return Tools\Paginator |
|
| 378 | 381 | */ |
| 379 | 382 | public function paginator() |
| 380 | 383 | { |
@@ -750,7 +753,7 @@ discard block |
||
| 750 | 753 | * |
| 751 | 754 | * @param Closure|null $closure |
| 752 | 755 | * |
| 753 | - * @return $this|Tools\Footer |
|
| 756 | + * @return callable |
|
| 754 | 757 | */ |
| 755 | 758 | public function footer(Closure $closure = null) |
| 756 | 759 | { |
@@ -290,14 +290,14 @@ |
||
| 290 | 290 | { |
| 291 | 291 | $trans_key = 'validation.attributes.' . $relationColumn; |
| 292 | 292 | $trans_key_low = strtolower($trans_key); |
| 293 | - if (empty($label) && Lang::has($trans_key)) { |
|
| 294 | - $label = Lang::get($trans_key); |
|
| 295 | - } |
|
| 296 | - if (empty($label) && Lang::has($trans_key_low)) { |
|
| 293 | + if (empty($label) && Lang::has($trans_key)) { |
|
| 294 | + $label = Lang::get($trans_key); |
|
| 295 | + } |
|
| 296 | + if (empty($label) && Lang::has($trans_key_low)) { |
|
| 297 | 297 | $label = Lang::get($trans_key_low); |
| 298 | 298 | }else if (empty($label)) { |
| 299 | - $label = ucfirst($relationColumn); |
|
| 300 | - } |
|
| 299 | + $label = ucfirst($relationColumn); |
|
| 300 | + } |
|
| 301 | 301 | return $label; |
| 302 | 302 | } |
| 303 | 303 | |
@@ -106,6 +106,10 @@ discard block |
||
| 106 | 106 | { |
| 107 | 107 | $this->setPresenter(new Text($this->label)); |
| 108 | 108 | } |
| 109 | + |
|
| 110 | + /** |
|
| 111 | + * @param string $label |
|
| 112 | + */ |
|
| 109 | 113 | public function setLabel($label) |
| 110 | 114 | { |
| 111 | 115 | $trans_key = 'validation.attributes.' . $label; |
@@ -350,7 +354,7 @@ discard block |
||
| 350 | 354 | * |
| 351 | 355 | * @param Presenter $presenter |
| 352 | 356 | * |
| 353 | - * @return mixed |
|
| 357 | + * @return Presenter |
|
| 354 | 358 | */ |
| 355 | 359 | protected function setPresenter(Presenter $presenter) |
| 356 | 360 | { |