init() public method

public init ( )
Ejemplo n.º 1
0
 function init()
 {
     parent::init();
     $this->hasOne('dokku_alt/Host');
     $this->addField('ts')->type('datetime')->defaultValue(date('Y-m-d H:i:s'));
     $this->addField('line');
 }
Ejemplo n.º 2
0
 function init()
 {
     parent::init();
     $this->addField('name')->caption('Volume Name')->mandatory(true)->sortable(true);
     $this->addField('dirname_field', 'dirname')->caption('Folder')->hint('You can use absolute path too')->mandatory(true)->sortable(true)->system(true);
     $this->addExpression('dirname')->set($this->dsql()->expr('CONCAT("websites/[0]/",[1])', [$this->app->current_website_name, $this->getElement('dirname_field')]))->caption('Folder')->hint('You can use absolute path too')->mandatory(true)->sortable(true);
     /*
     		// @todo there is no implementation of total_space and used_space
     		$this->addField('total_space')
             ->caption('Total space')
             ->hint('Volume size limit (bytes)')
             ->type('int')
             ->mandatory(true)
             ->defaultValue('1000000000')
             ->sortable(true)
             ;
     		$this->addField('used_space')
             ->caption('Used space')
             ->hint('Space used by files (bytes)')
             ->type('int')
             ->mandatory(true)
             ->defaultValue(0)
             ->display(array('form'=>'Readonly'))
             ->sortable(true)
             ;
     */
     $this->addField('stored_files_cnt')->caption('Files')->hint('Count of files in volume')->type('int')->mandatory(true)->defaultValue(0)->display(array('form' => 'Readonly'))->sortable(true);
     $this->addField('enabled')->caption('Writable')->hint('Be sure to check this one!')->type('boolean')->mandatory(true)->defaultValue(false)->sortable(true);
 }
Ejemplo n.º 3
0
 function init()
 {
     parent::init();
     $this->hasOne('Industry');
     $this->hasOne('Company');
     $this->hasOne('Department');
     $this->hasOne('Category');
     $this->addField('type')->enum(['routine', 'activity rule', 'task rule']);
     $this->addField('name');
     $this->addField('is_template')->type('boolean')->defaultValue(false);
     $this->addField('applicable_on')->type('text');
     $this->addField('is_done')->type('boolean')->defaultValue(false);
     $this->addField('auto_status')->type('text');
     $this->addField('moderated_by')->enum(['SVC Admin', 'Company Owner', 'Manager', 'Self', 'None']);
     $this->addField('is_mandatory')->type('boolean');
     $this->addField('applicable')->enum(['daily', 'weekly']);
     $this->addField('is_self_addable')->type('boolean');
     $this->addField('cross_check')->type('Number');
     // $this->containsMany('cross_check_options',function($m){
     // 	$m->addField('name');
     // 	$m->addField('gMarks')->type('text');
     // });
     $this->hasMany('RuleOption');
     $this->hasMany('gMarks');
     $this->add('dynamic_model/Controller_AutoCreator', ['engine' => 'INNODB']);
 }
Ejemplo n.º 4
0
 function init()
 {
     parent::init();
     $this->addField('name')->caption('Volume Name')->mandatory(true)->sortable(true);
     $this->addField('dirname')->caption('Folder')->hint('You can use absolute path too')->mandatory(true)->sortable(true);
     /*
     		// @todo there is no implementation of total_space and used_space
     		$this->addField('total_space')
             ->caption('Total space')
             ->hint('Volume size limit (bytes)')
             ->type('int')
             ->mandatory(true)
             ->defaultValue('1000000000')
             ->sortable(true)
             ;
     		$this->addField('used_space')
             ->caption('Used space')
             ->hint('Space used by files (bytes)')
             ->type('int')
             ->mandatory(true)
             ->defaultValue(0)
             ->display(array('form'=>'Readonly'))
             ->sortable(true)
             ;
     */
     $this->addField('stored_files_cnt')->caption('Files')->hint('Count of files in volume')->type('int')->mandatory(true)->defaultValue(0)->display(array('form' => 'Readonly'))->sortable(true);
     $this->addField('enabled')->caption('Writable')->hint('Be sure to check this one!')->type('boolean')->mandatory(true)->defaultValue(false)->sortable(true);
 }
Ejemplo n.º 5
0
 function init()
 {
     parent::init();
     $this->addField('email');
     $this->addField('password');
     $this->add('dynamic_model/Controller_AutoCreator_MySQL');
 }
Ejemplo n.º 6
0
 function init()
 {
     parent::init();
     $this->addField("session_id");
     $this->addField("data")->type("text");
     $this->addField("timestamp")->type("text");
 }
Ejemplo n.º 7
0
 function init()
 {
     parent::init();
     $this->addField('name');
     $this->hasMany('Rule');
     $this->add('dynamic_model/Controller_AutoCreator', ['engine' => 'INNODB']);
 }
Ejemplo n.º 8
0
 function init()
 {
     parent::init();
     $this->hasOne('dokku_alt/DB', null, null, 'DB');
     $this->hasOne('dokku_alt/App', null, null, 'App');
     $this->addHook('beforeSave,beforeDelete', $this);
 }
Ejemplo n.º 9
0
 function init()
 {
     parent::init();
     $this->hasOne('dokku_alt/App');
     $this->addField('is_redirect')->type('boolean');
     $this->addField('name');
     $this->addHook('afterSave,afterDelete', [$this, 'setDomains']);
 }
Ejemplo n.º 10
0
 function init()
 {
     parent::init();
     $this->addField('name')->caption('Your Name');
     $this->addField('ref')->system(true);
     $this->addField('descr')->caption('Suggestion or Feedback')->type('text');
     $this->addField('date')->system(true)->defaultValue(date('Y-m-d'));
 }
Ejemplo n.º 11
0
 function init()
 {
     parent::init();
     $this->addField('content');
     $this->addField('block_id');
     $this->addField('is_deleted');
     //->type('boolean');
 }
Ejemplo n.º 12
0
 function init()
 {
     parent::init();
     $this->addField('name')->caption('Name')->mandatory(true)->sortable(true);
     $this->addField('mime_type')->caption('MIME type')->mandatory(true)->sortable(true);
     $this->addField('extension')->caption('Filename extension')->mandatory(true)->sortable(true);
     $this->addField('allow')->caption('Allow')->hint('Be sure to check this one!')->type('boolean')->defaultValue(true)->mandatory(true)->sortable(true);
 }
Ejemplo n.º 13
0
 function init()
 {
     parent::init();
     //fields
     $this->addField('name');
     $this->addField('ui_name');
     $this->addField('is_active')->type('boolean');
 }
Ejemplo n.º 14
0
Archivo: Type.php Proyecto: xepan/xepan
 function init()
 {
     parent::init();
     $this->addField('name');
     $this->addField('mime_type');
     $this->addField('extension');
     // TODO: extension should be substituted when recording filename
 }
Ejemplo n.º 15
0
 function init()
 {
     parent::init();
     $this->hasOne('dokku_alt/App');
     $this->addField('name');
     $this->addField('value');
     $this->addHook('beforeInsert,beforeDelete,beforeModify', $this);
 }
 function init()
 {
     parent::init();
     $this->hasOne('RuleBook');
     $this->addField('name');
     $this->addField('gMarks')->type('text');
     $this->add('dynamic_model/Controller_AutoCreator', ['engine' => 'INNODB']);
 }
 function init()
 {
     parent::init();
     $this->hasOne('xepan\\commerce\\Item_CustomField_Generic', 'customfield_generic_id');
     $this->hasOne('xepan\\commerce\\Item_CustomField_Value', 'customfield_value_id');
     $this->hasOne('xepan\\commerce\\Model_Store_TransactionRow', 'store_transaction_row_id');
     $this->addField('custom_name');
     $this->addField('custom_value');
 }
Ejemplo n.º 18
0
 function init()
 {
     parent::init();
     $this->addField('page_id');
     $this->addField('language');
     $this->addField('meta_title');
     $this->addField('meta_keywords');
     $this->addField('meta_description');
 }
Ejemplo n.º 19
0
 function init()
 {
     parent::init();
     $this->hasOne('Company');
     $this->hasOne('User');
     $this->hasOne('Rule');
     $this->addField('gmarks');
     $this->add('dynamic_model/Controller_AutoCreator', ['engine' => 'INNODB']);
 }
Ejemplo n.º 20
0
 function init()
 {
     parent::init();
     //$this->hasOne('dokku_alt/App');
     $this->addField('type');
     $this->addField('fingerprint');
     $this->addField('publickey')->type('text')->caption('Public Key');
     $this->addField('privatekey')->type('text')->hint('Optional')->caption('Private Key');
 }
Ejemplo n.º 21
0
 function init()
 {
     parent::init();
     $this->addField('name');
     $this->addField('type')->enum(['mongodb', 'mariadb', 'postrgresql', 'redis', 'memcache'])->mandatory(true);
     $this->addHook('beforeInsert,beforeDelete', $this);
     $this->hasOne('dokku_alt/Host');
     $this->hasMany('dokku_alt/DB_Link', null, null, 'DB_Link');
 }
Ejemplo n.º 22
0
 function init()
 {
     parent::init();
     $this->addField('host');
     $this->addField('notes')->type('text');
     $this->addField('data')->type('text');
     $this->addField('is_secure')->type('boolean')->editable(false)->hint('Will use your current passkey to encrypt');
     $this->hasOne('User')->defaultValue($this->app->auth->model->id);
     $this->addHook('beforeUpdate', array($this, 'checkSecurity'));
 }
Ejemplo n.º 23
0
 function init()
 {
     parent::init();
     $this->hasOne('User')->defaultValue($this->api->auth->model->id);
     $this->addField('subject');
     $this->addField('content')->type('text')->display(['form' => 'RichText']);
     $this->add('filestore/Field_Image', 'image_id')->caption('Default Image');
     $this->addField('created_at')->type('datetime')->defaultValue($this->api->now);
     $this->add('dynamic_model/Controller_AutoCreator', ['engine' => 'INNODB']);
 }
Ejemplo n.º 24
0
 function init()
 {
     parent::init();
     $this->addField('key')->system(true)->visible(true)->editable(true)->readonly(true)->sortable(true);
     $this->addField('tr_en')->sortable(true);
     $this->addField('tr_de')->sortable(true);
     $this->addField('tr_ru')->sortable(true);
     $this->addField('tr_lv')->sortable(true);
     // extend and add your language
 }
Ejemplo n.º 25
0
 function init()
 {
     parent::init();
     $this->addField('id')->type('int')->system(true);
     $this->addField('country_code')->type('string')->caption('Country Code')->length(8);
     $this->addField('name')->type('string')->length(255);
     $this->addField('local_name');
     $this->addField('seat_city');
     $this->addField('province');
     $this->addField('juristidction');
 }
Ejemplo n.º 26
0
 function init()
 {
     parent::init();
     $this->addField('is_dam_controlled')->type('boolean')->defaultValue(true)->system(true);
     $this->addHook('afterLoad', function ($m) {
         if ($m['must_fetch']) {
             // var_dump('must fetch');
             // exit;
         }
     });
 }
Ejemplo n.º 27
0
 function init()
 {
     parent::init();
     //$this->debug();
     $this->addField('type')->setValueList($this->getAvailableTypes())->required();
     $this->addField('user_id')->required();
     $this->addField('access_code')->required();
     $this->addField('created_dts')->required();
     $this->addField('valid_seconds')->required();
     $this->addHooks();
 }
Ejemplo n.º 28
0
 function init()
 {
     parent::init();
     $this->hasOne('Industry');
     $this->hasOne('User', 'owner_id');
     $this->addField('name');
     $this->addField('is_closed')->type('boolean')->defaultValue(false);
     $this->hasMany('User', null, null, 'Staff');
     $this->hasMany('gMarks');
     $this->add('dynamic_model/Controller_AutoCreator', ['engine' => 'INNODB']);
 }
Ejemplo n.º 29
0
 function init()
 {
     parent::init();
     $this->addField('system_name');
     $this->addField('type');
     $this->addField('content')->type('text');
     $this->addField('page_id');
     $this->addField('language');
     $this->addField('order');
     $this->addField('is_deleted');
     //->type('boolean');
     $this->addHooks();
 }
Ejemplo n.º 30
0
 function init()
 {
     parent::init();
     $this->addField('name')->mandatory(true);
     $this->addField('addr')->mandatory(true);
     $this->addField('public_key')->type('text');
     $this->addField('private_key')->type('text')->visible(false);
     $this->addField('notes')->type('text');
     $this->hasMany('dokku_alt/App', null, null, 'App');
     $this->hasMany('dokku_alt/Host_Log', null, null, 'Host_Log');
     $this->hasMany('dokku_alt/DB', null, null, 'DB');
     $this->hasMany('dokku_alt/Access_Admin', null, null, 'Access');
     $this->addField('is_debug')->type('boolean');
 }