logo-radria.gif
   
Blog Download Documentation Forum Tasks Home
Blog Download Documentation Forum Tasks Home
barside-right.gif
barside-left.gif
logo-sql.gif





DataObject

The DataObject only works on Web Servers running PHP5. It's a DataAccessObject that allows the access and manipulation of data within Objects.

For working examples on usages of the DataObject check out by_example_php5

This is a reference documentation on the different features of the DataObject

Introduction

The data object is a big class that do more than just data access. It extend the sqlQuery object and add to it all the view and form feature of Radria.

Data Access

CRUD

View

Form

<?php 
  $cfg_plugin_expense_uri = "/Tab/Expense/";
  $cfg_plugin_expense_path = "plugin/Expense/";
 
  $do_expense = new Expense();
  $do_expense->setFields(new Fields("expense", $cfg_plugin_expense_path));
  $do_expense->prepareForm($cfg_plugin_expense_uri."All");
  $do_expense->form();
?>

This will display a form for the DataObject Expense using the Fields description “expense” that in plugin/Expense/fields/expense.reg.xml and then redirect ot the Tab/Expense/All page. The HTML do display the form is from an XML template stored in: report/default_form.row.tpl.report.xml

<?php 
  $do_expense = new Expense();
  $do_expense->newAddForm();
  $do_expense->setFields(new Fields("expense", $cfg_plugin_expense_path));
  $do_expense->form->addParam("goto", $cfg_plugin_expense_uri."All");
  $do_expense->form();
?>

Event Actions

FIXME

 
core/databoject.txt · Last modified: 2011/03/13 12:03 by admin
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki