Update widget documentation (fixes #706)

This commit is contained in:
Will Rossiter 2012-08-08 21:21:58 +12:00
parent b211c38010
commit f6c69d5241

View File

@ -96,6 +96,7 @@ An example widget is below:
<?php
class FlickrWidget extends Widget {
static $db = array(
"User" => "Varchar",
"Photoset" => "Varchar",
@ -242,6 +243,7 @@ sure that your controller follows the usual naming conventions, and it will be a
}
class MyWidget_Controller extends Widget_Controller {
function MyFormName() {
return new Form(
$this,
@ -258,6 +260,10 @@ sure that your controller follows the usual naming conventions, and it will be a
function doAction($data, $form) {
// $this->widget points to the widget
}
function Link() {
return __CLASS__;
}
}