jalendport/craft-roman 问题修复 & 功能扩展

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

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

jalendport/craft-roman

最新稳定版本:2.0.0

Composer 安装命令:

composer require jalendport/craft-roman

包简介

Convert an integer into roman numerals and vice versa.

README 文档

README

Craft CMS 4.0.0+ Scrutinizer Code Quality

Convert an integer into roman numerals and vice versa.

Roman banner

— Based on the Craft 2 version of the Roman plugin by Bransin Anderson

Installation

Requirements

This plugin requires Craft CMS 4.0.0 or later.

Plugin Store

Log into your control panel and click on 'Plugin Store'. Search for 'Roman'.

Composer

  1. Open your terminal and go to your Craft project:
cd /path/to/project
  1. Then tell Composer to load the plugin:
composer require jalendport/craft-roman
  1. In the Control Panel, go to Settings → Plugins and click the “Install” button for Roman.

Using Roman

Roman provides several Twig methods for easy conversion between integers and roman numerals:

  • You can pass an integer (or a string) into the getRoman() method to get roman numerals:

    {{ craft.roman.getRoman(298) }}     // Output: CCXCVIII
    {{ craft.roman.getRoman('539') }}   // Output: DXXXIX
    
  • You can pass a string (of roman numerals) into the getNumber() method to get an integer:

    {{ craft.roman.getNumber('ML') }}   // Output: 1050
    
  • Roman also includes a helper attribute to quickly get the current year in roman numeral form:

    {{ craft.roman.currentYear }}       // Output: MMXXIII
    

Found a Bug? Need Support?

Please open an issue describing what's going wrong.

Roadmap

Some things to do, and ideas for potential features:

  • Twig filter for converting all integers in a string of text to roman numerals.

If there's a feature you think should be added to Roman, please open an issue. PRs are also welcome!

Contributors

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-02-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固