コード例 #1
0
ファイル: TestFormModel.php プロジェクト: burbuja/pluf
 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();
 }
コード例 #2
0
ファイル: TestModels.php プロジェクト: burbuja/pluf
 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();
 }
コード例 #3
0
ファイル: Session.php プロジェクト: burbuja/pluf
 function getData($key = null, $default = '')
 {
     if (is_null($key)) {
         return parent::getData();
     }
     if (isset($this->data[$key])) {
         return $this->data[$key];
     } else {
         return $default;
     }
 }