Last active
June 24, 2023 23:12
-
-
Save estefanionsantos/5d094a01404aaae61c3d6cf10f4cd84c to your computer and use it in GitHub Desktop.
Rubricate widget image 01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* sintax: | |
$img = new ImageWidget('image.png'); | |
echo $img->getElement(); | |
*/ | |
use Rubricate\Widget\ImageWidget; | |
$img = new ImageWidget('https://rubricate.github.io/asset/image/debian.png'); | |
echo $img->getElement(); | |
# <img src="https://rubricate.github.io/asset/image/debian.png" alt="" /> | |
/** | |
* Using the "alt" attribute | |
* in the second argument | |
*/ | |
$img = new ImageWidget('https://rubricate.github.io/asset/image/debian.png', 'debian'); | |
echo $img->getElement(); | |
# <img src="https://rubricate.github.io/asset/image/debian.png" alt="debian" /> | |
# | |
# | |
# EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment