G
G
goldwizard132017-04-02 20:35:26
Yii
goldwizard13, 2017-04-02 20:35:26

How to change images to icons in yii?

How to change the output of images to icons in yii, for example, Font Awesome?
Here is the actual code:

<?php echo CHtml::image($this->module->getRegisteredImage('ban.png'), 'ban', array('title'=>Yii::t('BbiiModule.bbii', 'Ban IP address'), 'style'=>'cursor:pointer;', 'onclick'=>'if(confirm("' . Yii::t('BbiiModule.bbii','Do you really want to ban this IP address?') . '")) { banIp(' . $data->id . ', "' . $this->createAbsoluteUrl('moderator/banIp') . '") }')); ?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2017-04-03
@goldwizard13

<i class="fa fa-bandcamp" aria-hidden="true"></i>
then add whatever you want..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question