Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yii2bootstrap
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
yii2bootstrap
Commits
f90a610e
Commit
f90a610e
authored
May 29, 2015
by
Klimov Paul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs about `yii\bootstrap\Html` added
parent
ff0fe39d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
1 deletion
+32
-1
Html.php
Html.php
+1
-1
README.md
docs/guide/README.md
+1
-0
helper-html.md
docs/guide/helper-html.md
+30
-0
No files found.
Html.php
View file @
f90a610e
...
...
@@ -8,7 +8,7 @@
namespace
yii\bootstrap
;
/**
* Html is an enhanced version of [[\yii\helpers\Html]] helper class dedicated to Bootstrap needs.
* Html is an enhanced version of [[\yii\helpers\Html]] helper class dedicated to
the
Bootstrap needs.
* This class inherits all functionality available at [[\yii\helpers\Html]] and can be used as substitute.
*
* Attention: do not confuse [[\yii\bootstrap\Html]] and [[\yii\helpers\Html]], be careful in which class
...
...
docs/guide/README.md
View file @
f90a610e
...
...
@@ -20,6 +20,7 @@ Usage
-----
*
[
Yii widgets
](
usage-widgets.md
)
*
[
Html helper
](
helper-html.md
)
Additional topics
-----------------
...
...
docs/guide/helper-html.md
0 → 100644
View file @
f90a610e
Html helper
===========
Bootstrap introduces many consistent HTML constructions and skeletons, which allow creating different visual effects.
Only the most complex of them are covered by widgets provided with this extension. The rest should be composed manually
using direct HTML composition.
However, several special Bootstrap markup cases are covered by
[
[\yii\bootstrap\Html
]
] helper.
[
[\yii\bootstrap\Html
]
] is an enhanced version of the regular
[
[\yii\helpers\Html
]
] dedicated to the Bootstrap needs.
It provides several useful methods:
-
`icon()`
- allows rendering of Glyphicon icons
-
`staticControl()`
- allows rendering of form "static controls"
[
[\yii\bootstrap\Html
]
] inherits all functionality available at
[
[\yii\helpers\Html
]
] and can be used as substitute,
so you don't need them both inside your view files.
For example:
```
php
<?php
use
yii\bootstrap\Html
;
?>
<?=
Button
::
widget
([
'label'
=>
Html
::
icon
(
'approve'
)
.
Html
::
encode
(
'Save & apply'
),
'encodeLabel'
=>
false
,
'options'
=>
[
'class'
=>
'btn-primary'
],
]);
?>
```
> Attention: do not confuse [[\yii\bootstrap\Html]] and [[\yii\helpers\Html]], be careful in which class
you are using inside your views.
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment