https://github.com/yiirocks/svg-inline
Inline SVG Images for Yii
https://github.com/yiirocks/svg-inline
extension icon icons inline inline-svg-images packagist svg yii yii3
Last synced: 5 months ago
JSON representation
Inline SVG Images for Yii
- Host: GitHub
- URL: https://github.com/yiirocks/svg-inline
- Owner: YiiRocks
- License: mit
- Created: 2020-07-24T16:44:51.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-13T08:57:39.000Z (over 2 years ago)
- Last Synced: 2025-01-31T08:04:52.424Z (5 months ago)
- Topics: extension, icon, icons, inline, inline-svg-images, packagist, svg, yii, yii3
- Language: PHP
- Homepage: https://yii.rocks/svg-inline
- Size: 88.9 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Inline SVG Images for Yii
> **inline**
> ***/ˈɪnlʌɪn/***
> *adjective*
>
> included as part of the main text on a page, rather than in a separate sectionThis extension provides simple functions for [Yii framework 3.0](http://www.yiiframework.com/) applications to add
SVG Images inline.[](https://packagist.org/packages/yiirocks/svg-inline)
[](https://php.net/)
[](https://packagist.org/packages/yiirocks/svg-inline)
[](https://github.com/yiirocks/svg-inline/blob/master/LICENSE)## Installation
The package could be installed via composer:
```bash
composer require yiirocks/svg-inline
```It can be extended with [Bootstrap](https://getbootstrap.com/) [Icons](https://icons.getbootstrap.com/) and/or [Font Awesome](https://fontawesome.com/) [Icons](https://fontawesome.com/icons):
```bash
composer require yiirocks/svg-inline-bootstrap
composer require yiirocks/svg-inline-fontawesome
```## Usage
The default configuration will enable `$svg` in any view.
```php
echo $svg->file('@assets/image.svg');
```Available options can be found in the [documentation](https://www.yii.rocks/svg-inline/).
## Unit testing
The package is tested with [PHPUnit](https://phpunit.de/). To run tests:
```bash
./vendor/bin/phpunit
```[](https://codeclimate.com/github/YiiRocks/svg-inline/maintainability)
[](https://app.codacy.com/gh/YiiRocks/svg-inline)
[](https://scrutinizer-ci.com/g/yiirocks/svg-inline/?branch=master)
