Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rmrevin/yii2-socicon
Asset Bundle for Yii2 with Socicon http://www.socicon.com/
https://github.com/rmrevin/yii2-socicon
Last synced: 5 days ago
JSON representation
Asset Bundle for Yii2 with Socicon http://www.socicon.com/
- Host: GitHub
- URL: https://github.com/rmrevin/yii2-socicon
- Owner: rmrevin
- License: mit
- Created: 2015-05-03T10:20:27.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-05-20T18:21:20.000Z (over 8 years ago)
- Last Synced: 2024-09-19T08:15:10.555Z (13 days ago)
- Language: PHP
- Size: 251 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Yii 2 Socicon Asset Bundle
===============================
[![License](https://poser.pugx.org/rmrevin/yii2-socicon/license.svg)](https://packagist.org/packages/rmrevin/yii2-socicon)
[![Latest Stable Version](https://poser.pugx.org/rmrevin/yii2-socicon/v/stable.svg)](https://packagist.org/packages/rmrevin/yii2-socicon)
[![Latest Unstable Version](https://poser.pugx.org/rmrevin/yii2-socicon/v/unstable.svg)](https://packagist.org/packages/rmrevin/yii2-socicon)
[![Total Downloads](https://poser.pugx.org/rmrevin/yii2-socicon/downloads.svg)](https://packagist.org/packages/rmrevin/yii2-socicon)Code Status
-----------
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/rmrevin/yii2-socicon/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/rmrevin/yii2-socicon/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/rmrevin/yii2-socicon/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/rmrevin/yii2-socicon/?branch=master)
[![Travis CI Build Status](https://travis-ci.org/rmrevin/yii2-socicon.svg)](https://travis-ci.org/rmrevin/yii2-socicon)
[![Dependency Status](https://www.versioneye.com/user/projects/54119b799e16229fe00000da/badge.svg)](https://www.versioneye.com/user/projects/54119b799e16229fe00000da)Installation
------------
Add in `composer.json`:
```
{
"require": {
"rmrevin/yii2-socicon": "~1.1"
}
}
```Usage
-----
In view
```php// ...
rmrevin\yii\socicon\AssetBundle::register($this);
```
or as dependency in your asset bundle
```php// ...
class AppAsset extends AssetBundle
{
// ...public $depends = [
// ...
'\rmrevin\yii\socicon\AssetBundle'
];
}```
Helper
------
```phpuse rmrevin\yii\socicon\SI;
echo SI::icon('twitter');
//
echo SI::icon('twitter', ['class' => 'big', 'data-role' => 'social-button']);
//
echo Html::submitButton(Yii::t('app', '{check} Tweet', ['check' => SI::icon('twitter')]));
// Tweet// autocomplete in IDE
echo SI::icon(SI::_TWITTER);
echo SI::icon(SI::_DISQUS);
```### Another prefix
```php
SI::$cssPrefix = 'si';echo SI::icon('twitter');
//
```