定制 drmonkeyninja/cakephp-font-awesome 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

drmonkeyninja/cakephp-font-awesome

最新稳定版本:3.0.0

Composer 安装命令:

composer require drmonkeyninja/cakephp-font-awesome

包简介

CakePHP helper for creating Font Awesome links

README 文档

README

License

This plugin provides a simple helper for creating links containing markup for Font Awesome icons with properly escaped link text. You will need to install Font Awesome separately.

Requirements

  • CakePHP 3.x

Use the 2.x version for CakePHP 2.

Installation

This plugin can be installed using Composer:-

composer require drmonkeyninja/cakephp-font-awesome:3.*

Then add the following line to your bootstrap.php to load the plugin.

Plugin::load('FontAwesome');

You need to ensure the helper is loaded before you use it in your templates. You can do this from your AppView.php file in the initialize() method:-

public function initialize()
{
    $this->loadHelper('FontAwesome.Fa');
}

Usage

To render a link containing the markup for the fa-chevron-circle-right icon at the end you can do:-

<?= $this->Fa->link('chevron-circle-right', __('Proceed'), ['controller' => 'pages', 'display', 'next']) ?>

If you want the icon to appear before the text you can use the before option:-

<?= $this->Fa->link('chevron-circle-right', __('Proceed'), ['controller' => 'pages', 'display', 'next'], ['before' => true]) ?>

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-15