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
236d866b
Commit
236d866b
authored
May 18, 2015
by
Klimov Paul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Method `ActiveField::staticControl()` added
parent
34081f44
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
ActiveField.php
ActiveField.php
+14
-0
ActiveForm.php
ActiveForm.php
+9
-0
BaseHtml.php
BaseHtml.php
+0
-1
No files found.
ActiveField.php
View file @
236d866b
...
@@ -289,6 +289,20 @@ class ActiveField extends \yii\widgets\ActiveField
...
@@ -289,6 +289,20 @@ class ActiveField extends \yii\widgets\ActiveField
return
$this
;
return
$this
;
}
}
/**
* 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.
* @return $this the field object itself
*/
public
function
staticControl
(
$options
=
[])
{
$this
->
adjustLabelFor
(
$options
);
$this
->
parts
[
'{input}'
]
=
Html
::
activeStaticControl
(
$this
->
model
,
$this
->
attribute
,
$options
);
return
$this
;
}
/**
/**
* @inheritdoc
* @inheritdoc
*/
*/
...
...
ActiveForm.php
View file @
236d866b
...
@@ -97,4 +97,13 @@ class ActiveForm extends \yii\widgets\ActiveForm
...
@@ -97,4 +97,13 @@ class ActiveForm extends \yii\widgets\ActiveForm
}
}
parent
::
init
();
parent
::
init
();
}
}
/**
* @inheritdoc
* @return ActiveField the created ActiveField object
*/
public
function
field
(
$model
,
$attribute
,
$options
=
[])
{
return
parent
::
field
(
$model
,
$attribute
,
$options
);
}
}
}
BaseHtml.php
View file @
236d866b
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
namespace
yii\bootstrap
;
namespace
yii\bootstrap
;
use
yii\helpers\ArrayHelper
;
use
yii\helpers\ArrayHelper
;
use
yii\helpers\Html
;
/**
/**
* BaseHtml provides concrete implementation for [[Html]].
* BaseHtml provides concrete implementation for [[Html]].
...
...
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