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