Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add skeleton methods for widget features.

  • Loading branch information...
commit 4677cb9b19254789c7f4f13277998ca79d8d47dd 1 parent fd98d2b
Mark Story markstory authored
Showing with 29 additions and 0 deletions.
  1. +29 −0 src/View/Helper/FormHelper.php
29 src/View/Helper/FormHelper.php
View
@@ -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) {
+
+ }
+
}
Please sign in to comment.
Something went wrong with that request. Please try again.