Now let's extend the Hello World module from the previous page to store data, using Epesi's Objective RecordBrowser (RBO) — a utility for defining and persisting records to the database through the Record Browser CRUD engine.
Create a file named Recordset.php in ./epesi/modules/Custom/HelloWorld, alongside the files you already created for this module.
(Screenshot of the resulting file layout is missing from this page — flagged during the August 2026 documentation review.)
Copy the following code into the file:
<?php
defined("_VALID_ACCESS") || die('Direct access forbidden');
class Custom_HelloWorld_Recordset extends RBO_Recordset {
function table_name() { // name of the table stored in the Epesi database
return 'HelloWorld';
}
function fields() { // fields to add to the record browser
$category_name = new RBO_Field_Text(_M('Name'));
$category_name->set_length(24)->set_required()->set_visible();
$description = new RBO_Field_LongText(_M('Description'));
$description->set_visible();
return array($category_name, $description); // return all defined fields
}
}
This doesn't do much on its own — it just creates one recordset with two fields:
varchar with a length of 24 charactersNotice that instead of $category_name = new RBO_Field_Text('Name'), where 'Name' is both the field's internal name and its label, we used the _M() function: $category_name = new RBO_Field_Text(_M('Name'));. _M() marks the string for automatic translation, so the label "Name" can be translated into other languages, making your module multilingual.
See Using Translations for more on Epesi's translation mechanism.
Recordset.php is autoloaded once it's referenced in the module's installation file. Add this to Custom_HelloWorldInstall.php's install() function to install the recordset:
$fields = new Custom_HelloWorld_Recordset();
$success = $fields->install();
$fields->add_default_access();
$fields->set_caption(_M('Hello World'));
Remember to uninstall the recordset too, in the uninstall() function:
public function uninstall() { // uninstallation process for the module
$fields = new Custom_HelloWorld_Recordset();
$success = $fields->uninstall();
return true; // return true on success, false on failure
}
Now you can use the RecordBrowser engine to browse, view, edit, and delete data. To display it in the module's view, add this to the body() function in HelloWorld_0.php:
$rs = new Custom_HelloWorld_Recordset();
$this->rb = $rs->create_rb_module($this, 'Custom_HelloWorld');
$this->display_module($this->rb);
The whole file should now look like this:
<?php
defined("_VALID_ACCESS") || die('Direct access forbidden'); // security feature
class Custom_HelloWorld extends Module { // notice how the class name mirrors its path
public function body() { // module's main code
print('Hello World');
// call Record Browser
$rs = new Custom_HelloWorld_Recordset();
$this->rb = $rs->create_rb_module($this, 'Custom_HelloWorld');
$this->display_module($this->rb);
}
}
Reinstall your module and open it. Its output should now look like this:
(Screenshots of the running module and its "Add new" form are missing from this page — flagged during the August 2026 documentation review.)
Adding records is straightforward: click Add new, and you'll see the inputs defined in Recordset.php's fields() function. Click Save when you're done.
You've now created a module that stores data in the database using the Record Browser CRUD engine. The next page covers the different field types available in RBO.