adrianheras/amount-symbol 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

adrianheras/amount-symbol

最新稳定版本:1.0

Composer 安装命令:

composer require adrianheras/amount-symbol

包简介

Amount symbol Twig extension where you can easily add symbol to amounts like currencies and percentages

README 文档

README

This is a Twig extension for Symfony2 Framework where you can easily add symbol to amounts like currencies and percentages.

For example

{{ merkat.cash|amount_symbol("EUR") }}

Outputs 70.95 €

Installation for Symfony2

  1. Update your composer.json
"require": {
	"adrianheras/amount-symbol": "1.*"
}

or use composer's require command:

composer require adrianheras/amount-symbol:1.*
  1. Register an Extension as a Service

Now you must let the Service Container know about your newly created Twig Extension:

YAML:

# app/config/config.yml
services:
	adrianheras.twig.amount_symbol:
		class: AdrianHeras\Twig\Extension\AmountSymbolExtension
		tags:
		- { name: twig.extension }

XML:

# or into your bundle src\Acme\AcmeBundle\Resources\config\services.xml

<service id="adrianheras.twig.amount_symbol" class="AdrianHeras\Twig\Extension\AmountSymbolExtension">
	<tag name="twig.extension" />
</service>

统计信息

  • 总下载量: 26
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-02