Created
June 25, 2023 04:14
-
-
Save estefanionsantos/56abf7a4011f48ce9e95597b83b908cc to your computer and use it in GitHub Desktop.
Rubricate Anchor Widget 02
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 | |
use Rubricate\Widget\AnchorIfWidget; | |
$if = (1 == 1); | |
$href = 'https://rubricate.github.io'; | |
$text = 'Rubricate'; | |
$a = new AnchorIfWidget($if, $href, $text); | |
echo $a->getElement(); | |
/* | |
$if = (1 == 1); # true | |
result: <a href="https://rubricate.github.io">Rubricate</a> | |
$if = (1 == 2); # false | |
result: null | |
*/ | |
# EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment