yiirocks / svg-inline
Inline SVG Images for Yii
1.0.2
2026-03-20 11:46 UTC
Requires
- php: >=8.2
- ext-dom: *
- yiisoft/aliases: ^3.0
- yiisoft/html: ^3.9 || ^4.0
- yiisoft/yii-view-renderer: ^7.3
Requires (Dev)
- friendsofphp/php-cs-fixer: @stable
- httpsoft/http-message: @stable
- phpmd/phpmd: @stable
- phpunit/phpunit: @stable
- squizlabs/php_codesniffer: @stable
- vimeo/psalm: @stable
- yiirocks/svg-inline-bootstrap: *
- yiirocks/svg-inline-fontawesome: *
- yiisoft/config: @stable
- yiisoft/di: @stable
- yiisoft/files: @stable
Suggests
- yiirocks/svg-inline-bootstrap: Bootstrap Icons are designed to work with Bootstrap components, from form controls to navigation.
- yiirocks/svg-inline-fontawesome: Get vector icons and social logos on your website with Font Awesome, the web's most popular icon set and toolkit.
This package is auto-updated.
Last update: 2026-03-20 18:11:00 UTC
README
inline
/ˈɪnlʌɪn/
adjectiveincluded as part of the main text on a page, rather than in a separate section
This extension provides simple functions for Yii framework 3.0 applications to add SVG Images inline.
Installation
The package could be installed via composer:
composer require yiirocks/svg-inline
It can be extended with Bootstrap Icons and/or Font Awesome Icons:
composer require yiirocks/svg-inline-bootstrap composer require yiirocks/svg-inline-fontawesome
Usage
The default configuration will enable $svg in any view.
echo $svg->file('@assets/image.svg');
Available options can be found in the documentation.
Unit testing
The package is tested with Psalm and PHPUnit. To run tests:
composer psalm composer phpunit