Permalink
Browse files

Update doc blocks and coding standards.

  • Loading branch information...
markstory committed Jan 12, 2014
1 parent 80d3a0e commit a2a4c8ca0eb09e97cbe47614bc495b6046939050
Showing with 10 additions and 3 deletions.
  1. +10 −2 src/View/Input/Checkbox.php
  2. +0 −1 tests/TestCase/View/Input/CheckboxTest.php
@@ -14,8 +14,6 @@
*/
namespace Cake\View\Input;
-use Cake\View\StringTemplate;
-
/**
* Input widget for creating checkbox widgets.
*/
@@ -40,7 +38,17 @@ public function __construct($templates) {
/**
* Render a checkbox element.
*
+ * Data supports the following keys:
+ *
+ * - `name` - The name of the input.
+ * - `value` - The value attribute. Defaults to '1'.
+ * - `checked` - Whether or not the checkbox should be checked.
+ * - `disabled` - Whether or not the checkbox should be disabled.
+ *
+ * Any other attributes passed in will be treated as HTML attributes.
+ *
* @param array $data The data to create a checkbox with.
+ * @return string Generated HTML string.
*/
public function render($data) {
$data += [
@@ -165,5 +165,4 @@ public function testRenderCheckedValue() {
$this->assertTags($result, $expected);
}
-
}

0 comments on commit a2a4c8c

Please sign in to comment.