yiirocks/svg-inline Inline SVG Images for Yii

Inline SVG Images for Yii

  1. Installation
  2. Usage
  3. Unit testing

inline
/ˈɪnlʌɪn/
adjective

included 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.

Packagist Version PHP from Packagist Packagist GitHub

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

Maintainability Codacy branch grade GitHub Workflow Status

0 0
1 follower
811 downloads
Yii Version: Unknown
License: MIT
Category: Web Service
Tags: icon, SVG, yii3
Developed by: Иван Иван
Created on: Dec 24, 2020
Last updated: 5 months ago
Packagist Profile
Github Repository

Related Extensions