@@ -104,9 +104,6 @@ discard block |
||
| 104 | 104 | * Handle relation search action. |
| 105 | 105 | * Currently used for SelectField with type `select2` and `ajax = true`. |
| 106 | 106 | * |
| 107 | - * @param string $field |
|
| 108 | - * @param string $page |
|
| 109 | - * @param string $term |
|
| 110 | 107 | * @return \Illuminate\Http\JsonResponse |
| 111 | 108 | */ |
| 112 | 109 | public function searchRelation(Request $request) |
@@ -712,6 +709,9 @@ discard block |
||
| 712 | 709 | } |
| 713 | 710 | } |
| 714 | 711 | |
| 712 | + /** |
|
| 713 | + * @param string $title |
|
| 714 | + */ |
|
| 715 | 715 | protected function addTab($title, array $fields) |
| 716 | 716 | { |
| 717 | 717 | foreach ($fields as $field) { |
@@ -807,7 +807,7 @@ discard block |
||
| 807 | 807 | /** |
| 808 | 808 | * Check if user has permission for the action. |
| 809 | 809 | * |
| 810 | - * @param $action |
|
| 810 | + * @param string $action |
|
| 811 | 811 | * @return bool |
| 812 | 812 | */ |
| 813 | 813 | protected function can($action): bool |
@@ -273,6 +273,9 @@ discard block |
||
| 273 | 273 | return sprintf('%s%s%s/force-delete', $this->baseUrl(), self::BASE_URL_DELIMITER, $id); |
| 274 | 274 | } |
| 275 | 275 | |
| 276 | + /** |
|
| 277 | + * @param string $identifier |
|
| 278 | + */ |
|
| 276 | 279 | public function toolbarUrl($identifier) |
| 277 | 280 | { |
| 278 | 281 | return sprintf('%s%stoolbar/%s', $this->baseUrl(), self::BASE_URL_DELIMITER, $identifier); |
@@ -325,6 +328,9 @@ discard block |
||
| 325 | 328 | return rtrim($chunks[0], '/'); |
| 326 | 329 | } |
| 327 | 330 | |
| 331 | + /** |
|
| 332 | + * @param integer $ident |
|
| 333 | + */ |
|
| 328 | 334 | public function tableIdentifier($ident = null) |
| 329 | 335 | { |
| 330 | 336 | if (is_null($ident)) { |
@@ -369,6 +375,9 @@ discard block |
||
| 369 | 375 | $this->preferences()->saveCurrentLocale($this->tableIdentifier(), $locale); |
| 370 | 376 | } |
| 371 | 377 | |
| 378 | + /** |
|
| 379 | + * @return \Illuminate\Http\Request |
|
| 380 | + */ |
|
| 372 | 381 | public function getTool($ident) |
| 373 | 382 | { |
| 374 | 383 | if (array_key_exists($ident, $this->toolbar)) { |
@@ -40,6 +40,9 @@ |
||
| 40 | 40 | return $field; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | + /** |
|
| 44 | + * @param string $model |
|
| 45 | + */ |
|
| 43 | 46 | public function setModel($model) |
| 44 | 47 | { |
| 45 | 48 | $this->model = $model; |
@@ -52,6 +52,9 @@ |
||
| 52 | 52 | return $this; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | + /** |
|
| 56 | + * @return string |
|
| 57 | + */ |
|
| 55 | 58 | public function getPath() |
| 56 | 59 | { |
| 57 | 60 | return $this->path; |
@@ -254,6 +254,9 @@ |
||
| 254 | 254 | return $this; |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | + /** |
|
| 258 | + * @return integer |
|
| 259 | + */ |
|
| 257 | 260 | abstract public function getModel(); |
| 258 | 261 | abstract public function isMultiple(); |
| 259 | 262 | } |
@@ -2,8 +2,8 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | namespace Yaro\Jarboe\Http\Controllers; |
| 4 | 4 | |
| 5 | -use BaconQrCode\Renderer\Image\SvgImageBackEnd; |
|
| 6 | 5 | use BaconQrCode\Renderer\ImageRenderer; |
| 6 | +use BaconQrCode\Renderer\Image\SvgImageBackEnd; |
|
| 7 | 7 | use BaconQrCode\Renderer\RendererStyle\RendererStyle; |
| 8 | 8 | use BaconQrCode\Writer; |
| 9 | 9 | use Illuminate\Routing\Controller; |
@@ -14,9 +14,9 @@ discard block |
||
| 14 | 14 | use PragmaRX\Google2FA\Google2FA; |
| 15 | 15 | use Yaro\Jarboe\Events\Auth\InvalidOTP; |
| 16 | 16 | use Yaro\Jarboe\Events\Auth\LoginFailed; |
| 17 | -use Yaro\Jarboe\Events\Auth\Registered; |
|
| 18 | 17 | use Yaro\Jarboe\Events\Auth\LoginSuccess; |
| 19 | 18 | use Yaro\Jarboe\Events\Auth\Logout; |
| 19 | +use Yaro\Jarboe\Events\Auth\Registered; |
|
| 20 | 20 | use Yaro\Jarboe\Http\Middleware\RedirectIfAdminAuthenticated; |
| 21 | 21 | use Yaro\Jarboe\Http\Requests\Auth\LoginRequest; |
| 22 | 22 | use Yaro\Jarboe\Http\Requests\Auth\RegisterRequest; |
@@ -64,6 +64,9 @@ discard block |
||
| 64 | 64 | $this->add($actions); |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | + /** |
|
| 68 | + * @param string $ident |
|
| 69 | + */ |
|
| 67 | 70 | public function isAllowed($ident, $model = null): bool |
| 68 | 71 | { |
| 69 | 72 | $action = $this->find($ident); |
@@ -84,6 +87,9 @@ discard block |
||
| 84 | 87 | return $action->shouldRender($model); |
| 85 | 88 | } |
| 86 | 89 | |
| 90 | + /** |
|
| 91 | + * @param string $baseActionIdent |
|
| 92 | + */ |
|
| 87 | 93 | public function moveAfter($baseActionIdent, $movableActionIdent) |
| 88 | 94 | { |
| 89 | 95 | $actions = []; |
@@ -102,6 +108,9 @@ discard block |
||
| 102 | 108 | $this->actions = $actions; |
| 103 | 109 | } |
| 104 | 110 | |
| 111 | + /** |
|
| 112 | + * @param string $baseActionIdent |
|
| 113 | + */ |
|
| 105 | 114 | public function moveBefore($baseActionIdent, $movableActionIdent) |
| 106 | 115 | { |
| 107 | 116 | $actions = []; |
@@ -4,10 +4,10 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Illuminate\Http\Request; |
| 6 | 6 | use Illuminate\Http\UploadedFile; |
| 7 | -use Yaro\Jarboe\Table\Fields\Traits\Placeholder; |
|
| 8 | -use Yaro\Jarboe\Table\Fields\Traits\Storage; |
|
| 9 | 7 | use Illuminate\Support\Facades\Storage as IlluminateStorage; |
| 10 | 8 | use Intervention\Image\ImageManagerStatic as InterventionImage; |
| 9 | +use Yaro\Jarboe\Table\Fields\Traits\Placeholder; |
|
| 10 | +use Yaro\Jarboe\Table\Fields\Traits\Storage; |
|
| 11 | 11 | |
| 12 | 12 | class Image extends AbstractField |
| 13 | 13 | { |
@@ -2,13 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Yaro\Jarboe\Table\Fields; |
| 4 | 4 | |
| 5 | -use Illuminate\Database\Eloquent\Relations\BelongsTo; |
|
| 6 | -use Illuminate\Database\Eloquent\Relations\BelongsToMany; |
|
| 7 | -use Illuminate\Database\Eloquent\Relations\HasMany; |
|
| 8 | -use Illuminate\Database\Eloquent\Relations\HasOne; |
|
| 9 | -use Illuminate\Database\Eloquent\Relations\MorphMany; |
|
| 10 | -use Illuminate\Database\Eloquent\Relations\MorphTo; |
|
| 11 | -use Illuminate\Database\Eloquent\Relations\MorphToMany; |
|
| 12 | 5 | use Illuminate\Http\Request; |
| 13 | 6 | use Illuminate\Support\Collection; |
| 14 | 7 | use Yaro\Jarboe\Table\Fields\Traits\Orderable; |