Browse Source

Update doc blocks and coding standards.

mark_story 12 years ago
parent
commit
a2a4c8ca0e
2 changed files with 10 additions and 3 deletions
  1. 10 2
      src/View/Input/Checkbox.php
  2. 0 1
      tests/TestCase/View/Input/CheckboxTest.php

+ 10 - 2
src/View/Input/Checkbox.php

@@ -14,8 +14,6 @@
  */
 namespace Cake\View\Input;
 
-use Cake\View\StringTemplate;
-
 /**
  * Input widget for creating checkbox widgets.
  */
@@ -40,7 +38,17 @@ class Checkbox {
 /**
  * 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 += [

+ 0 - 1
tests/TestCase/View/Input/CheckboxTest.php

@@ -165,5 +165,4 @@ class CheckboxTest extends TestCase {
 		$this->assertTags($result, $expected);
 	}
 
-
 }