11 New User Notifications
Select a tab above to activate This blank page message helps protect your privacy, or you can show the first message here automatically through settings page
- Melissa Ayre INBOX Re: New security codes Hello again and thanks for being part... 56 seconds ago
- Adison Lee Msed quia non numquam eius 2 minutes ago
- Oliver Kopyuv Msed quia non numquam eius 3 days ago
- Dr. John Cook PhD Msed quia non numquam eius 2 weeks ago
- Sarah McBrook Msed quia non numquam eius 3 weeks ago
- Anothony Bezyeth Msed quia non numquam eius one month ago
- Lisa Hatchensen Msed quia non numquam eius one year ago
-
Administrator UPDATE System updated to version 4.6.3 (patch notes) 5 mins ago
-
Adison Lee replied to your video Cancer Drug Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day... 10 minutes ago
[your date here]
|
||||||
---|---|---|---|---|---|---|
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
30 | 1 | 2 | 3 | 4 | 5 | 6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 | 1 | 2 | 3 |
2:30PM - Doctor's appointment
3:30PM - Report overview
4:30PM - Meeting with Donnah V.
5:30PM - Late Lunch
6:30PM - Report Compression
- SmartAdmin
- PHP Components
- Controls
- Button
PHP Controls Bootstrap controls for PHP
\Bootstrap\Components\Button
Code
$button = new \Bootstrap\Components\Button('Touch Me!');
$button->id('my-button')->type('input')->class('bg-success-50');
$button->printHtml();
Result
Documentation
\Bootstrap\Components\Button
A component that enables you to easily write <button>
control through PHP.
Usage
Instantiate the Button
by passing a content
.
$button = new \Bootstrap\Components\Button('Touch Me!');
// continued below...
Options
Button::options
Option | Default | Description |
---|---|---|
disabled |
false |
If the control is disabled |
Example:
// during init
$button = new \Bootstrap\Components\Button('Touch Me!', ['disabled' => true]);
// after init
$button->options('disabled', true);
Other properties
Button::content
- The content of the buttonButton::icon
- Sets the iconButton::type
- Sets thetype
attributeButton::container
- Sets the container/wrapper (default<button>
)Button::size
- Sets the size (lg
,sm
, etc.)Button::attr
- Sets additinoal attributesButton::id
- Sets theid
attributeButton::class
- Sets theclass
attribute
Styling
To learn more about styling the <button>
, see UI Buttons demo.
Finally, once you configured your button, you can now htmlPrint
it!
$button->printHtml();
Credits
\Bootstrap\Components\Button
is part of the lodev09/bootstrap-php package created by @lodev09.