opale/externaluribundle
最新稳定版本:1.1.3
Composer 安装命令:
composer require opale/externaluribundle
包简介
Build Uri that goes outside of your symfony application
README 文档
README
INSTALLATION via Composer
composer require opale/externaluribundle
CONFIGURATION
Register the bundle:
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Opale\ExternalUriBundle\OpaleExternalUriBundle(), ); // ... }
Add external routes in a config file (ex.: externalRouting.yml)
xternal_url_key: scheme: "https" path: /path/{configurationId} host: %acme_example.service_url%
Add your externalRouting.yml in the config.yml
# Opale ExternalUriGenerator configuration opale_external_uri: resources: - { resource: %kernel.root_dir%/../src/Acme/MyBundle/Resources/config/externalRouting.yml }
USAGE
TWIG
{{ externalUrl(xternal_url_key, {configurationId: 103}) }}
... or
{{ externalUrl(xternal_url_key) }}
Service
Call the service opale_external_uri.generator
$this->get('opale_external_uri.generator')->generate('xternal_url_key', ['configurationId' => 103]);
统计信息
- 总下载量: 20.64k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-02-03