Skip to content

Commit

Permalink
Add skeleton methods for widget features.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Feb 11, 2014
1 parent fd98d2b commit 4677cb9
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/View/Helper/FormHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2942,4 +2942,33 @@ public function inputDefaults($defaults = null, $merge = false) {
return $this->_inputDefaults;
}

/**
* Add a new widget to FormHelper.
*
* Allows you to add or replace widget instances with custom code.
*
* @param string $name The name of the widget. e.g. 'text'.
* @param array|WidgetInterface Either a string class name or an object
* implementing the WidgetInterface.
* @return void
*/
public function addWidget($name, $spec) {
}

/**
* Render a named widget.
*
* This is a lower level method. For built-in widgets, you should be using
* methods like `text`, `hidden`, and `radio`. If you are using additional
* widgets you should use this method render the widget without the label
* or wrapping div.
*
* @param string $name The name of the widget. e.g. 'text'.
* @param array $attrs The attributes for rendering the input.
* @return void
*/
public function widget($name, $data) {

}

}

0 comments on commit 4677cb9

Please sign in to comment.