function init() { $this->_a['table'] = 'testformmodels'; $this->_a['model'] = 'TestFormModel'; $this->_a['cols'] = array('id' => array('type' => 'Pluf_DB_Field_Sequence', 'blank' => true), 'title' => array('type' => 'Pluf_DB_Field_Varchar', 'blank' => false, 'size' => 100, 'verbose' => 'Title of the item'), 'description' => array('type' => 'Pluf_DB_Field_Text', 'blank' => true, 'help_text' => 'This is a small description')); $this->_admin = array('list_display' => array('id', array('title', 'TestFormModel_ConvertTitle'), array('title', 'TestFormModel_ConvertTitle', 'My Title')), 'search_fields' => array('title', 'description')); parent::init(); }
function init() { $this->_a['table'] = 'relatedtotestmodel'; $this->_a['model'] = 'RelatedToTestModel'; $this->_a['cols'] = array('id' => array('type' => 'Pluf_DB_Field_Sequence', 'blank' => true), 'testmodel' => array('type' => 'Pluf_DB_Field_Foreignkey', 'blank' => false, 'model' => 'TestModel'), 'dummy' => array('type' => 'Pluf_DB_Field_Varchar', 'blank' => false, 'size' => 100)); $this->_a['idx'] = array('testmodel_id' => array('type' => 'normal', 'col' => 'testmodel')); $this->_a['views'] = array(); parent::init(); }