get additional property

This commit is contained in:
Kavalar 2024-11-28 12:15:30 +03:00
parent 2133fae2cc
commit 44e61a2030
4 changed files with 109 additions and 94 deletions

View File

@ -87,8 +87,14 @@ class TagModule extends Module
} }
public function getItems(string $entity, Model $model): array public function getItems(string $entity, Model $model): array|string
{ {
return TagEntity::where("entity", $entity)->where("entity_id", $model->id)->with("tag")->get()->toArray(); $tags = TagEntity::where("entity", $entity)->where("entity_id", $model->id)->with("tag")->get();
$tagsStr = "";
foreach ($tags as $tag) {
$tagsStr .= $tag->tag->label . ", ";
}
return substr($tagsStr, 0, -2);
} }
} }

176
composer.lock generated
View File

@ -275,16 +275,16 @@
}, },
{ {
"name": "firebase/php-jwt", "name": "firebase/php-jwt",
"version": "v6.10.1", "version": "v6.10.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/firebase/php-jwt.git", "url": "https://github.com/firebase/php-jwt.git",
"reference": "500501c2ce893c824c801da135d02661199f60c5" "reference": "30c19ed0f3264cb660ea496895cfb6ef7ee3653b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/500501c2ce893c824c801da135d02661199f60c5", "url": "https://api.github.com/repos/firebase/php-jwt/zipball/30c19ed0f3264cb660ea496895cfb6ef7ee3653b",
"reference": "500501c2ce893c824c801da135d02661199f60c5", "reference": "30c19ed0f3264cb660ea496895cfb6ef7ee3653b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -332,9 +332,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/firebase/php-jwt/issues", "issues": "https://github.com/firebase/php-jwt/issues",
"source": "https://github.com/firebase/php-jwt/tree/v6.10.1" "source": "https://github.com/firebase/php-jwt/tree/v6.10.2"
}, },
"time": "2024-05-18T18:05:11+00:00" "time": "2024-11-24T11:22:49+00:00"
}, },
{ {
"name": "graham-campbell/result-type", "name": "graham-campbell/result-type",
@ -725,16 +725,16 @@
}, },
{ {
"name": "illuminate/collections", "name": "illuminate/collections",
"version": "v11.28.1", "version": "v11.34.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/collections.git", "url": "https://github.com/illuminate/collections.git",
"reference": "2d99ccbb19e34450508ff3ab2f62ba90aa2e9793" "reference": "fd2103ddc121449a7926fc34a9d220e5b88183c1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/illuminate/collections/zipball/2d99ccbb19e34450508ff3ab2f62ba90aa2e9793", "url": "https://api.github.com/repos/illuminate/collections/zipball/fd2103ddc121449a7926fc34a9d220e5b88183c1",
"reference": "2d99ccbb19e34450508ff3ab2f62ba90aa2e9793", "reference": "fd2103ddc121449a7926fc34a9d220e5b88183c1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -776,20 +776,20 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "source": "https://github.com/laravel/framework"
}, },
"time": "2024-10-10T19:23:07+00:00" "time": "2024-11-27T14:51:56+00:00"
}, },
{ {
"name": "illuminate/conditionable", "name": "illuminate/conditionable",
"version": "v11.28.1", "version": "v11.34.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/conditionable.git", "url": "https://github.com/illuminate/conditionable.git",
"reference": "362dd761b9920367bca1427a902158225e9e3a23" "reference": "911df1bda950a3b799cf80671764e34eede131c6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/illuminate/conditionable/zipball/362dd761b9920367bca1427a902158225e9e3a23", "url": "https://api.github.com/repos/illuminate/conditionable/zipball/911df1bda950a3b799cf80671764e34eede131c6",
"reference": "362dd761b9920367bca1427a902158225e9e3a23", "reference": "911df1bda950a3b799cf80671764e34eede131c6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -822,20 +822,20 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "source": "https://github.com/laravel/framework"
}, },
"time": "2024-06-28T20:10:30+00:00" "time": "2024-11-21T16:28:56+00:00"
}, },
{ {
"name": "illuminate/container", "name": "illuminate/container",
"version": "v11.28.1", "version": "v11.34.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/container.git", "url": "https://github.com/illuminate/container.git",
"reference": "06dfc614aff58384b28ba5ad191f6a02d6b192cb" "reference": "b057b0bbb38d7c7524df1ca5c38e7318f4c64d26"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/illuminate/container/zipball/06dfc614aff58384b28ba5ad191f6a02d6b192cb", "url": "https://api.github.com/repos/illuminate/container/zipball/b057b0bbb38d7c7524df1ca5c38e7318f4c64d26",
"reference": "06dfc614aff58384b28ba5ad191f6a02d6b192cb", "reference": "b057b0bbb38d7c7524df1ca5c38e7318f4c64d26",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -873,20 +873,20 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "source": "https://github.com/laravel/framework"
}, },
"time": "2024-10-11T15:30:11+00:00" "time": "2024-11-21T20:07:31+00:00"
}, },
{ {
"name": "illuminate/contracts", "name": "illuminate/contracts",
"version": "v11.28.1", "version": "v11.34.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/contracts.git", "url": "https://github.com/illuminate/contracts.git",
"reference": "56312862af937bd6da8e6dc8bbd88188dfb478f8" "reference": "184317f701ba20ca265e36808ed54b75b115972d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/illuminate/contracts/zipball/56312862af937bd6da8e6dc8bbd88188dfb478f8", "url": "https://api.github.com/repos/illuminate/contracts/zipball/184317f701ba20ca265e36808ed54b75b115972d",
"reference": "56312862af937bd6da8e6dc8bbd88188dfb478f8", "reference": "184317f701ba20ca265e36808ed54b75b115972d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -921,7 +921,7 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "source": "https://github.com/laravel/framework"
}, },
"time": "2024-09-22T15:08:08+00:00" "time": "2024-11-25T15:33:38+00:00"
}, },
{ {
"name": "illuminate/database", "name": "illuminate/database",
@ -1060,7 +1060,7 @@
}, },
{ {
"name": "illuminate/macroable", "name": "illuminate/macroable",
"version": "v11.28.1", "version": "v11.34.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/macroable.git", "url": "https://github.com/illuminate/macroable.git",
@ -1106,16 +1106,16 @@
}, },
{ {
"name": "illuminate/support", "name": "illuminate/support",
"version": "v11.28.1", "version": "v11.34.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/illuminate/support.git", "url": "https://github.com/illuminate/support.git",
"reference": "bd0983d4a22eccde1773809d4897bb533c3f26fd" "reference": "2b718a86571baed50fdc5d5748a846c2e58e07eb"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/illuminate/support/zipball/bd0983d4a22eccde1773809d4897bb533c3f26fd", "url": "https://api.github.com/repos/illuminate/support/zipball/2b718a86571baed50fdc5d5748a846c2e58e07eb",
"reference": "bd0983d4a22eccde1773809d4897bb533c3f26fd", "reference": "2b718a86571baed50fdc5d5748a846c2e58e07eb",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1127,9 +1127,9 @@
"illuminate/conditionable": "^11.0", "illuminate/conditionable": "^11.0",
"illuminate/contracts": "^11.0", "illuminate/contracts": "^11.0",
"illuminate/macroable": "^11.0", "illuminate/macroable": "^11.0",
"nesbot/carbon": "^2.72.2|^3.0", "nesbot/carbon": "^2.72.2|^3.4",
"php": "^8.2", "php": "^8.2",
"voku/portable-ascii": "^2.0" "voku/portable-ascii": "^2.0.2"
}, },
"conflict": { "conflict": {
"tightenco/collect": "<5.5.33" "tightenco/collect": "<5.5.33"
@ -1145,7 +1145,7 @@
"symfony/process": "Required to use the composer class (^7.0).", "symfony/process": "Required to use the composer class (^7.0).",
"symfony/uid": "Required to use Str::ulid() (^7.0).", "symfony/uid": "Required to use Str::ulid() (^7.0).",
"symfony/var-dumper": "Required to use the dd function (^7.0).", "symfony/var-dumper": "Required to use the dd function (^7.0).",
"vlucas/phpdotenv": "Required to use the Env class and env helper (^5.4.1)." "vlucas/phpdotenv": "Required to use the Env class and env helper (^5.6.1)."
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -1178,7 +1178,7 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "source": "https://github.com/laravel/framework"
}, },
"time": "2024-10-16T16:25:45+00:00" "time": "2024-11-27T14:58:17+00:00"
}, },
{ {
"name": "itguild/eloquent-table", "name": "itguild/eloquent-table",
@ -1276,11 +1276,11 @@
}, },
{ {
"name": "itguild/tables", "name": "itguild/tables",
"version": "1.0.8", "version": "1.0.9",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.itguild.info/ItGuild/tables", "url": "https://git.itguild.info/ItGuild/tables",
"reference": "5f46431d4562d2b4d8bff43b446fef82ecf73b83" "reference": "5effacf12fd68d31181304562deb7331cf42c1db"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -1298,7 +1298,7 @@
"email": "apuc06@mail.ru" "email": "apuc06@mail.ru"
} }
], ],
"time": "2024-10-11T13:31:11+00:00" "time": "2024-11-28T08:57:17+00:00"
}, },
{ {
"name": "josantonius/session", "name": "josantonius/session",
@ -1503,20 +1503,20 @@
}, },
{ {
"name": "nesbot/carbon", "name": "nesbot/carbon",
"version": "3.8.0", "version": "3.8.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/briannesbitt/Carbon.git", "url": "https://github.com/briannesbitt/Carbon.git",
"reference": "bbd3eef89af8ba66a3aa7952b5439168fbcc529f" "reference": "e1268cdbc486d97ce23fef2c666dc3c6b6de9947"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/bbd3eef89af8ba66a3aa7952b5439168fbcc529f", "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/e1268cdbc486d97ce23fef2c666dc3c6b6de9947",
"reference": "bbd3eef89af8ba66a3aa7952b5439168fbcc529f", "reference": "e1268cdbc486d97ce23fef2c666dc3c6b6de9947",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"carbonphp/carbon-doctrine-types": "*", "carbonphp/carbon-doctrine-types": "<100.0",
"ext-json": "*", "ext-json": "*",
"php": "^8.1", "php": "^8.1",
"psr/clock": "^1.0", "psr/clock": "^1.0",
@ -1605,7 +1605,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-08-19T06:22:39+00:00" "time": "2024-11-07T17:46:48+00:00"
}, },
{ {
"name": "phpoption/phpoption", "name": "phpoption/phpoption",
@ -2139,16 +2139,16 @@
}, },
{ {
"name": "symfony/clock", "name": "symfony/clock",
"version": "v7.1.1", "version": "v7.1.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/clock.git", "url": "https://github.com/symfony/clock.git",
"reference": "3dfc8b084853586de51dd1441c6242c76a28cbe7" "reference": "97bebc53548684c17ed696bc8af016880f0f098d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/clock/zipball/3dfc8b084853586de51dd1441c6242c76a28cbe7", "url": "https://api.github.com/repos/symfony/clock/zipball/97bebc53548684c17ed696bc8af016880f0f098d",
"reference": "3dfc8b084853586de51dd1441c6242c76a28cbe7", "reference": "97bebc53548684c17ed696bc8af016880f0f098d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2193,7 +2193,7 @@
"time" "time"
], ],
"support": { "support": {
"source": "https://github.com/symfony/clock/tree/v7.1.1" "source": "https://github.com/symfony/clock/tree/v7.1.6"
}, },
"funding": [ "funding": [
{ {
@ -2209,20 +2209,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-05-31T14:57:53+00:00" "time": "2024-09-25T14:20:29+00:00"
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
"version": "v3.5.0", "version": "v3.5.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git", "url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
"reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2260,7 +2260,7 @@
"description": "A generic function and convention to trigger deprecation notices", "description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1"
}, },
"funding": [ "funding": [
{ {
@ -2276,20 +2276,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-04-18T09:32:20+00:00" "time": "2024-09-25T14:20:29+00:00"
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v7.1.4", "version": "v7.1.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/finder.git", "url": "https://github.com/symfony/finder.git",
"reference": "d95bbf319f7d052082fb7af147e0f835a695e823" "reference": "2cb89664897be33f78c65d3d2845954c8d7a43b8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/d95bbf319f7d052082fb7af147e0f835a695e823", "url": "https://api.github.com/repos/symfony/finder/zipball/2cb89664897be33f78c65d3d2845954c8d7a43b8",
"reference": "d95bbf319f7d052082fb7af147e0f835a695e823", "reference": "2cb89664897be33f78c65d3d2845954c8d7a43b8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2324,7 +2324,7 @@
"description": "Finds files and directories via an intuitive fluent interface", "description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/finder/tree/v7.1.4" "source": "https://github.com/symfony/finder/tree/v7.1.6"
}, },
"funding": [ "funding": [
{ {
@ -2340,7 +2340,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-08-13T14:28:19+00:00" "time": "2024-10-01T08:31:23+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
@ -2735,16 +2735,16 @@
}, },
{ {
"name": "symfony/translation", "name": "symfony/translation",
"version": "v7.1.5", "version": "v7.1.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/translation.git", "url": "https://github.com/symfony/translation.git",
"reference": "235535e3f84f3dfbdbde0208ede6ca75c3a489ea" "reference": "b9f72ab14efdb6b772f85041fa12f820dee8d55f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/235535e3f84f3dfbdbde0208ede6ca75c3a489ea", "url": "https://api.github.com/repos/symfony/translation/zipball/b9f72ab14efdb6b772f85041fa12f820dee8d55f",
"reference": "235535e3f84f3dfbdbde0208ede6ca75c3a489ea", "reference": "b9f72ab14efdb6b772f85041fa12f820dee8d55f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2809,7 +2809,7 @@
"description": "Provides tools to internationalize your application", "description": "Provides tools to internationalize your application",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/translation/tree/v7.1.5" "source": "https://github.com/symfony/translation/tree/v7.1.6"
}, },
"funding": [ "funding": [
{ {
@ -2825,20 +2825,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-16T06:30:38+00:00" "time": "2024-09-28T12:35:13+00:00"
}, },
{ {
"name": "symfony/translation-contracts", "name": "symfony/translation-contracts",
"version": "v3.5.0", "version": "v3.5.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/translation-contracts.git", "url": "https://github.com/symfony/translation-contracts.git",
"reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a" "reference": "4667ff3bd513750603a09c8dedbea942487fb07c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/translation-contracts/zipball/b9d2189887bb6b2e0367a9fc7136c5239ab9b05a", "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/4667ff3bd513750603a09c8dedbea942487fb07c",
"reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a", "reference": "4667ff3bd513750603a09c8dedbea942487fb07c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2887,7 +2887,7 @@
"standards" "standards"
], ],
"support": { "support": {
"source": "https://github.com/symfony/translation-contracts/tree/v3.5.0" "source": "https://github.com/symfony/translation-contracts/tree/v3.5.1"
}, },
"funding": [ "funding": [
{ {
@ -2903,7 +2903,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-04-18T09:32:20+00:00" "time": "2024-09-25T14:20:29+00:00"
}, },
{ {
"name": "twbs/bootstrap", "name": "twbs/bootstrap",
@ -2957,16 +2957,16 @@
}, },
{ {
"name": "twig/twig", "name": "twig/twig",
"version": "v3.14.0", "version": "v3.15.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/twigphp/Twig.git", "url": "https://github.com/twigphp/Twig.git",
"reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72" "reference": "2d5b3964cc21d0188633d7ddce732dc8e874db02"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/126b2c97818dbff0cdf3fbfc881aedb3d40aae72", "url": "https://api.github.com/repos/twigphp/Twig/zipball/2d5b3964cc21d0188633d7ddce732dc8e874db02",
"reference": "126b2c97818dbff0cdf3fbfc881aedb3d40aae72", "reference": "2d5b3964cc21d0188633d7ddce732dc8e874db02",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3020,7 +3020,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/twigphp/Twig/issues", "issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v3.14.0" "source": "https://github.com/twigphp/Twig/tree/v3.15.0"
}, },
"funding": [ "funding": [
{ {
@ -3032,7 +3032,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-09-09T17:55:12+00:00" "time": "2024-11-17T15:59:19+00:00"
}, },
{ {
"name": "vlucas/phpdotenv", "name": "vlucas/phpdotenv",
@ -3120,16 +3120,16 @@
}, },
{ {
"name": "voku/portable-ascii", "name": "voku/portable-ascii",
"version": "2.0.1", "version": "2.0.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/voku/portable-ascii.git", "url": "https://github.com/voku/portable-ascii.git",
"reference": "b56450eed252f6801410d810c8e1727224ae0743" "reference": "b1d923f88091c6bf09699efcd7c8a1b1bfd7351d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/voku/portable-ascii/zipball/b56450eed252f6801410d810c8e1727224ae0743", "url": "https://api.github.com/repos/voku/portable-ascii/zipball/b1d923f88091c6bf09699efcd7c8a1b1bfd7351d",
"reference": "b56450eed252f6801410d810c8e1727224ae0743", "reference": "b1d923f88091c6bf09699efcd7c8a1b1bfd7351d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3154,7 +3154,7 @@
"authors": [ "authors": [
{ {
"name": "Lars Moelleken", "name": "Lars Moelleken",
"homepage": "http://www.moelleken.org/" "homepage": "https://www.moelleken.org/"
} }
], ],
"description": "Portable ASCII library - performance optimized (ascii) string functions for php.", "description": "Portable ASCII library - performance optimized (ascii) string functions for php.",
@ -3166,7 +3166,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/voku/portable-ascii/issues", "issues": "https://github.com/voku/portable-ascii/issues",
"source": "https://github.com/voku/portable-ascii/tree/2.0.1" "source": "https://github.com/voku/portable-ascii/tree/2.0.3"
}, },
"funding": [ "funding": [
{ {
@ -3190,7 +3190,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2022-03-08T17:03:00+00:00" "time": "2024-11-21T01:49:47+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],
@ -3205,5 +3205,5 @@
"ext-zip": "*" "ext-zip": "*"
}, },
"platform-dev": [], "platform-dev": [],
"plugin-api-version": "2.6.0" "plugin-api-version": "2.3.0"
} }

View File

@ -190,12 +190,15 @@ class EntityRelation
{ {
$relations = $this->getEntityRelationsBySlug($entity); $relations = $this->getEntityRelationsBySlug($entity);
if ($relations){ if ($relations){
$relationsArr = [];
foreach ($relations as $relation){ foreach ($relations as $relation){
$moduleClass = $this->getAdditionalPropertyClassBySlug($relation); $moduleClass = $this->getAdditionalPropertyClassBySlug($relation);
if ($moduleClass and method_exists($moduleClass, "getItems")) { if ($moduleClass and method_exists($moduleClass, "getItems")) {
return $moduleClass->getItems($entity, $model); $relationsArr[$relation] = $moduleClass->getItems($entity, $model);
} }
} }
return $relationsArr;
} }
return []; return [];

View File

@ -26,17 +26,23 @@ $table->beforePrint(function () use ($content) {
}); });
$entityRelation = new \kernel\EntityRelation(); $entityRelation = new \kernel\EntityRelation();
$additional = $entityRelation->getEntityAdditionalProperty("post", $content); $additionals = $entityRelation->getEntityAdditionalProperty("post", $content);
foreach ($additionals as $key => $additional) {
$table->addRow($key, function () use ($additional) {
return $additional;
}, ['after' => 'user_id']);
}
$table->rows([ $table->rows([
'created_at' => function ($data) { 'created_at' => function ($data) {
if (!$data){ if (!$data) {
return null; return null;
} }
return (new DateTimeImmutable($data))->format("d-m-Y"); return (new DateTimeImmutable($data))->format("d-m-Y");
}, },
'updated_at' => function ($data) { 'updated_at' => function ($data) {
if (!$data){ if (!$data) {
return null; return null;
} }
return (new DateTimeImmutable($data))->format("d-m-Y"); return (new DateTimeImmutable($data))->format("d-m-Y");