...
Code Block | ||||
---|---|---|---|---|
| ||||
<?php
class MyModule extends Module {
...
public function getPackageFields($vars=null) {
// Create the label
$fields = new ModuleFields();
$my_label = $fields->label("My Field Label", "my_field_id");
##
# TODO: FINISH THIS EXAMPLE
#
##
// Create and attach the field to the label
$my_label->attach($fields->fieldCheckbox("my_field_name", array('id' => "my_field_id")));
// Attach a tooltip to the label
$my_label->attach($fields->tooltip("This is my tooltip"));
$fields->setField($my_label);
return $fields;
}
}
?> |
...