Last active
June 25, 2023 19:13
-
-
Save estefanionsantos/0eb8842871cf4564814b23a3af745201 to your computer and use it in GitHub Desktop.
Rubricate Div Widget 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 | |
use Rubricate\Widget\DivWidget; | |
/* Example 1 */ | |
$div = new DivWidget('Text Here'); | |
echo $div->getElement(); | |
# <div>Text Here</div> | |
/* Example 2*/ | |
$div = new DivWidget('Some Text'); | |
$div->setAttribute('id', 'id_1'); | |
$div->setAttribute('class', 'highlight'); | |
$div->setAttribute('rel', 'rel_1'); | |
$div->setAttribute('style', 'color: #c00'); | |
echo $div->getElement(); | |
# result: <div id="id_1" class="highlight" rel="rel_1" style="color: #c00">Some Text</div> | |
# EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment