-
-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yii\bootstrap\Html
helper added
#34
Conversation
Nice idea. |
PR updated. |
* @inheritdoc | ||
* @return ActiveField the created ActiveField object | ||
*/ | ||
public function field($model, $attribute, $options = []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it safe to remove it? It does nothing other than calling parent implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is added for IDE type-hint support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be done via @method
annotation w/o actual implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I am using same approach as:
https://github.com/yiisoft/yii2/blob/master/framework/db/ActiveQuery.php#L128
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
Overall, it looks fine. |
* Renders Bootstrap static form control. | ||
* @param array $options the tag options in terms of name-value pairs. These will be rendered as | ||
* the attributes of the resulting tag. There are also a special options: | ||
* - encode: boolean, whether value should be HTML-encoded or not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a newline is required before this list, otherwise it would not render properly.
except the phpdoc formatting which needs to be adjusted for all methods in BaseHtml too, it looks fine to me. |
`yii\bootstrap\Html` helper added
Fixes #42 and #43.
yii\bootstrap\Html
helper added.