Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
296fc72d
Commit
296fc72d
authored
Jan 28, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more clear docs about html options
fixes yiisoft/yii#2844
parent
f9dee9c9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
BaseHtml.php
framework/helpers/BaseHtml.php
+5
-2
Html.php
framework/helpers/Html.php
+4
-0
No files found.
framework/helpers/BaseHtml.php
View file @
296fc72d
...
...
@@ -113,9 +113,12 @@ class BaseHtml
* @param string $name the tag name
* @param string $content the content to be enclosed between the start and end tags. It will not be HTML-encoded.
* If this is coming from end users, you should consider [[encode()]] it to prevent XSS attacks.
* @param array $options the
tag options in terms of name-value pairs. These will be rendered as
* the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
* @param array $options the
HTML tag attributes (HTML options) in terms of name-value pairs.
*
These will be rendered as
the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]].
* If a value is null, the corresponding attribute will not be rendered.
*
* For example when using `['class' => 'my-class', 'target' => '_blank', 'value' => null]` it will result in the
* html attributes rendered like this: `class="my-class" target="_blank"`.
* @return string the generated HTML tag
* @see beginTag()
* @see endTag()
...
...
framework/helpers/Html.php
View file @
296fc72d
...
...
@@ -10,6 +10,10 @@ namespace yii\helpers;
/**
* Html provides a set of static methods for generating commonly used HTML tags.
*
* Nearly all of the methods in this class allow setting additional html attributes for the html
* tags they generate. You can specify for example. 'class', 'style' or 'id' for an html element
* using the `$options` parameter. See the documentation of the [[tag()]] method for more details.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
...
...
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