survos/core-bundle
最新稳定版本:2.0.96
Composer 安装命令:
composer require survos/core-bundle
包简介
Traits and Interfaces common to other Survos bundles
README 文档
README
Symfony Bundle with interfaces, traits, models and services needed by more than one Survos components. For example, Model\Column is used by grid, api-grid and simple-datatables. RouteParametersInterface is used by tree and the griid bundles.
composer req survos/core-bundle
<?php // src/Entity/Foo.php namespace App\Entity; use Survos\CoreBundle\Entity\RouteParametersInterface; use Survos\CoreBundle\Entity\RouteParametersTrait; class Foo implements RouteParametersInterface { use RouteParametersTrait; public function getUniqueParams(): array { return ['fooId' => $this->getFooCode()]; }
Now use .rp in twig and ->getRp() in php as part of generating a route
<a href="{{ path('foo_show', foo.rp) }}">Show</a>
Combined with survos/maker-bundle, create a param converter
bin/console survos:make:param-converter Foo
Helper Tasks
echo "SYMFONY_DEPRECATIONS_HELPER=weak" >> .env
统计信息
- 总下载量: 15.07k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 19
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-06-11