beastbytes/yii2-footnotes 问题修复 & 功能扩展

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

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

beastbytes/yii2-footnotes

最新稳定版本:v1.0.0

Composer 安装命令:

composer require beastbytes/yii2-footnotes

包简介

Yii2 Extension that simplies adding and management of footnotes on a web page

README 文档

README

Yii2 Extension that simplies adding and management of footnotes on a web page; it generates accessible, automatically numbered footnotes.

Inspired by the Accessible Footnotes with CSS article.

For license information check the LICENSE-file.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist beastbytes/yii2-footnotes

or add

"beastbytes/yii2-footnotes": "*"

to the require section of your composer.json.

Usage

In a view:

$footnotes = Footnotes::begin(); // Before any footnote references on the page
echo $footnotes->add('Local text', 'Footnote text'); // at every footnote reference
Footnotes::end(); // where the footnotes are to be rendered

Example

 $footnotes = Footnotes::begin();
// Can be other view stuff here
echo Html::tag('p', strtr('This example shows how to use the {Footnotes widget}.', [
    '{Footnotes widget}' => $footnotes->add('Footnotes widget', 'The Footnotes widget makes it easy to add accessible footnotes.'),
]));
// More view stuff
echo Html::tag('p', strtr('The Footnotes widget uses the {Yii2 framework}.', [
    '{Yii2 framework}' => $footnotes->add('Yii 2 framework', 'The Yii2 framework is the best framework for developing web applications.'),
]));
// More view stuff, maybe with some more footnote references
Footnotes::end(); // renders the footnotes

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-07-26