DataObjects/Builder.php
[Pman.Builder] / DataObjects / Builder_app.php
1 <?php
2 /**
3  * Table Definition for builder_app
4  */
5 class_exists('DB_DataObject') ? '' : require_once 'DB/DataObject.php';
6
7 class Pman_Builder_DataObjects_Builder_app extends DB_DataObject 
8 {
9     ###START_AUTOCODE
10     /* the code below is auto generated do not remove the above tag */
11
12     public $__table = 'builder_app';                     // table name
13     public $id;                              // int(11)  not_null primary_key auto_increment
14     public $app;                             // string(64)  not_null
15     public $davurl;                          // string(128)  not_null
16     public $davwrite;                        // int(2)  not_null
17
18     
19     /* the code above is auto generated do not remove the tag below */
20     ###END_AUTOCODE
21     // * - beforeDelete() -- return false for fail and set DO->err;
22
23     function beforeDelete()
24     {
25         $x = DB_DataObject::factory('Builder');
26         $x->app = $this->app;
27         if ($x->count()) {
28             $this->err = "Modules exist with this name!";
29             return false;
30         }
31         return true;
32     }
33     
34 }