function init() { parent::init(); $this->hasOne('Scholar', 'scholar_id')->mandatory('Scholar is must'); $this->hasOne('Class', 'class_id')->mandatory('Class is Must'); $this->hasOne('Session', 'session_id'); $this->addField('roll_no')->type('int')->caption('roll number'); $this->addField('ishostler')->type('boolean')->defaultValue(false)->caption("Is Hostler"); $this->addField('isScholared')->type('boolean'); $this->addField('Section'); $this->addField('store_no'); $this->addField('isalloted')->type('boolean')->defaultValue(false); $this->addField('is_result_stop')->type('boolean')->defaultValue(false); $this->addField('bpl')->type('boolean')->defaultValue(false); // $this->addField('result_stopped')->type('boolean')->defaultValue(false); $this->hasMany('RoomAllotement', 'student_id'); $this->hasMany('Item_Issue', 'student_id'); $this->hasMany('Students_Disease', 'student_id'); $this->hasMany('Students_Movement', 'student_id'); $this->hasMany('Students_Attendance', 'student_id'); $this->hasMany('Students_Marks', 'student_id'); $this->hasMany('Fees_Applicable', 'student_id'); $this->addExpression('name')->set(function ($m, $q) { return $m->refSQL('scholar_id')->dsql()->del('field')->field('hname'); })->display('hindi'); $this->addExpression('fname')->set(function ($m, $q) { return $m->refSQL('scholar_id')->dsql()->del('field')->field('fname'); })->caption('Name(English)'); $this->addExpression("father_name")->set(function ($m, $q) { return $m->refSQL('scholar_id')->fieldQuery('father_name'); })->display('hindi'); $this->dsql()->order('fname', 'asc'); }
function init() { parent::init(); $this->addField('name'); $this->addField('year')->type('int'); $this->addField('imdb')->caption('IMDB Link'); }
function init() { parent::init(); $this->hasOne('Hostel_Disease', 'disease_id'); $this->addField('name')->caption('treatment'); $this->addField('treatment_date')->type('datetime')->defaultValue(date('Y-m-d H:i:s')); }
function init() { parent::init(); $this->hasOne('Class', 'class_id'); $this->hasOne('Subject', 'subject_id'); $this->hasOne('Session', 'session_id'); }
function init() { parent::init(); $this->addField('title'); $this->addField('date')->type('date')->defaultValue(date('Ymd')); $this->addField('body')->type('text'); }
function init() { parent::init(); $this->addField('name')->display('hindi'); $this->hasMany("ExamClassMap", "exam_id"); $this->addHook('beforeDelete', $this); }
function init() { parent::init(); $this->addField('ftype')->mandatory('Fee Head Should have a name')->caption('Fee Type'); $this->addField('amount')->type("int")->mandatory("Fee Amount should be entered"); $this->addField('isoptional')->type('boolean')->caption('IsOptional'); }
function init() { parent::init(); $this->addExpression('sn')->set($this->_dsql()->expr('(select @sn :=@sn + 1 AS sn FROM (SELECT @sn := 0) as sn)')); $this->addField('admission_date')->type('date')->mandatory("Required Field")->defaultValue(date('d-m-Y')); $this->addField('scholar_no')->mandatory("Scholar Number is Must"); $this->addField('fname')->mandatory("Name is Must")->caption('Name(English)'); $this->addField('hname')->mandatory("Name is Must")->caption('Name(Hindi)'); $this->addField('father_name')->mandatory("Required Field")->caption('Father`s Name'); //$this->add("filestore/Field_Image","f_image")->caption('father Image'); $this->addField('mother_name')->mandatory("Required Field")->caption('Mother`s Name'); //$this->add("filestore/Field_Image","m_image")->caption('Mother Image'); $this->addField('guardian_name'); $this->addField('dob')->type('date')->mandatory("Required Field")->caption('Date of Birth'); $this->addField('contact')->mandatory("Required Field"); $this->add("filestore/Field_Image", "student_image"); //->type('image');//$this->add("filestore/Field_Image", "student_image"); $this->addField('p_address')->datatype('Text')->mandatory("Required Field")->caption('Permanent Address'); $this->addField('sex')->setValueList(array('M' => 'Male', 'F' => 'Female')); $this->addField("isActive")->type('boolean')->mandatory("Is This Active")->defaultValue(true); $this->addField('leaving_date')->type('date')->defaultValue(null); $this->addExpression('name')->set('hname'); $this->addExpression('Student_name')->set('fname'); $this->addField('category')->setValueList(array(null => 'Select Category', 'GEN' => 'GEN', "ST" => "ST", "SC" => "SC", "TAD" => "TAD(ST)", "OBC" => "OBC", "SOBC" => "SPECIAL OBC", "MINORITY" => "MINORITY")); //$this->addExpression('age')->set('year(now())-year(dob)'); $this->dsql()->order('hname'); // if(!$all) $this->addCondition('isActive',true); }
function init() { parent::init(); $this->addField('doj')->type('date')->mandatory("Required Field")->defaultValue(date('d-m-Y'))->caption('Date of Joining'); $this->addField('ename')->mandatory("Name is Must")->caption('Name(English)'); $this->addField('hname')->mandatory("Name is Must")->caption('Name(Hindi)')->display('hindi'); $this->addField('designation')->mandatory("Designation is Must")->caption('Designation')->display('hindi'); $this->addField('father_name')->mandatory("Required Field")->caption('Father`s Name/Husband`s Name')->display('hindi'); $this->addField('mother_name')->mandatory("Required Field")->caption('Mother`s Name')->display('hindi'); $this->addField('guardian_name')->caption('Eligiblity')->display('hindi'); $this->addField('dob')->type('date')->mandatory("Required Field")->caption('Date of Birth'); $this->addField('contact')->mandatory("Required Field"); $this->addField('pan_no')->mandatory("Required Field"); $this->add("filestore/Field_Image", "image"); //->type('image');//$this->add("filestore/Field_Image", "student_image"); $this->addField('address')->type('Text')->mandatory("Required Field")->caption('Address')->display('hindi'); $this->addField('sex')->setValueList(array('Male', 'Female'))->defaultValue('M')->display(array('form' => 'dropdown')); $this->addField('accno')->caption('Bank Account Number'); $this->addField('insurance_no')->caption('Insurance'); $this->addField('ofhostel')->type('boolean')->caption("Hostel"); $this->addField('remarks')->type('Text')->display('hindi'); $this->addField('is_active')->type('boolean')->defaultValue(true); $this->hasMany('Staff_Movement', 'staff_id'); $this->addExpression('name')->set('hname'); $this->_dsql()->order('ename', 'asc'); $this->addExpression('attendance_status')->set(function ($m, $q) { return "(select `action` from `staff_outward` where `staff_outward`.`staff_id` = `staff_master`.`id` and `staff_outward`.`session_id` = " . $m->add('Model_Sessions_Current')->tryLoadAny()->get('id') . " order by `id` desc, `id` desc limit 0, 1) "; return $m->refSQL('Staff_Movement')->addCondition('session_id', $m->add('Model_Sessions_Current')->tryLoadAny()->get('id'))->_dsql()->limit(1)->order('id', 'desc')->del('field')->field('action'); })->display('attendance'); $fs = $this->leftJoin('filestore_file', 'image')->leftJoin('filestore_image.original_file_id')->leftJoin('filestore_file', 'thumb_file_id'); $fs->addField('image_url', 'filename')->display(array('grid' => 'picture')); }
function init() { parent::init(); $this->addField('employee_id')->caption('Paid To')->refModel('Model_Employee'); $this->addField('pay_date')->datatype('date')->defaultValue(date('Y-m-d')); $this->addField('amount')->datatype('money'); }
function init() { parent::init(); $this->hasOne('xepan\\cms\\Custom_Form', 'custom_form_id'); $this->addField('value')->type('text'); $this->addHook('afterInsert', $this); }
function init() { parent::init(); $this->hasOne('Epan', 'epan_id')->mandatory(true); //$this->addCondition('epan_id',$this->api->current_website->id); $f = $this->addField('name')->group('a~6~<i class="fa fa-user"></i> User Info')->mandatory(true); $f->icon = 'fa fa-user~red'; $f = $this->addField('type')->setValueList(array(100 => 'SuperUser', 80 => 'BackEndUser', 50 => 'FrontEndUser'))->defaultValue(0)->group('a~6'); $f->icon = "fa fa-question~red"; $f = $this->addField('username')->group('b~6~<i class="fa fa-lock"></i> Login Credentials')->mandatory(true); $f->icon = "fa fa-lock~red"; $f = $this->addField('password')->type('password')->group('b~6')->mandatory(true); $f->icon = "fa fa-key~red"; $f = $this->addField('email')->mandatory(true); $f->icon = "fa fa-envelope~red"; $f = $this->addField('created_at')->type('date')->defaultValue(date('Y-m-d'))->display(array('form' => 'Readonly'))->group('c~6'); $f->icon = 'fa fa-calendar~blue'; // $this->addField('is_systemuser')->type('boolean')->defaultValue(false); // $this->addField('is_frontenduser')->type('boolean')->defaultValue(false); // $this->addField('is_backenduser')->type('boolean')->defaultValue(false); $f = $this->addField('is_active')->type('boolean')->defaultValue(false)->group('c~6'); $f->icon = "fa fa-exclamation~blue"; $f = $this->addField('activation_code')->group('d~3')->display(array('form' => 'Readonly')); $f->icon = 'fa fa-unlock-alt~blue'; $f = $this->addField('last_login_date')->type('date')->group('d~9')->display(array('form' => 'Readonly')); $f->icon = 'fa fa-calendar~blue'; $this->addHook('beforeDelete', $this); $this->addHook('beforeSave', $this); // $this->add('dynamic_model/Controller_AutoCreator'); }
function init() { parent::init(); $this->hasOne('xepan/commerce/QSP_Master', 'qsp_master_id'); $this->hasOne('xepan/commerce/DiscountVoucher', 'discountvoucher_id'); $this->hasOne('xepan/commerce/Customer', 'customer_id'); }
function init() { parent::init(); $this->hasOne('Category', 'parent_id')->display(array('form' => 'misc/drilldown')); $this->hasMany('Category', 'parent_id'); $this->addField('name'); }
/** * This class describes models which can be added on the page */ function init() { parent::init(); $this->addField('page')->caption('Appears on page'); $this->addField('is_approved')->type('boolean')->defaultValue('Y'); $this->addField('atk_user_id')->refModel('Model_ATK_User'); }
function init() { parent::init(); $this->hasOne('Epan', 'epan_id'); $this->hasOne('MarketPlace', 'component_id'); $this->addField('params')->system(true); $this->addField('enabled')->type('boolean')->defaultValue(true); $this->addField('installed_on')->type('date')->defaultValue(date('Y-m-d H:i:s'))->system(true); $marketplace_j = $this->leftJoin('epan_components_marketplace', 'component_id'); $marketplace_j->addField('namespace'); $marketplace_j->addField('type'); $marketplace_j->addField('name'); // $marketplace_j->addField('is_final'); $marketplace_j->addField('allowed_children'); $marketplace_j->addField('specific_to'); $marketplace_j->addField('is_system'); $marketplace_j->addField('description'); // $marketplace_j->addField('plugin_hooked'); $marketplace_j->addField('default_enabled'); $marketplace_j->addField('has_toolbar_tools'); $marketplace_j->addField('has_owner_modules'); $marketplace_j->addField('has_plugins'); $marketplace_j->addField('has_live_edit_app_page'); // $this->add('dynamic_model/Controller_AutoCreator'); }
function init() { parent::init(); $this->addField('name', 'building_name')->mandatory('Name is must'); $this->hasMany('HostelRoom', 'hostel_id'); $this->addExpression('Rooms')->set(function ($m, $q) { return $m->refSQL('HostelRoom')->count(); }); $this->addExpression('capacity')->set(function ($m, $q) { return $m->refSQL('HostelRoom')->sum('capacity'); }); $this->addExpression('alloted')->set(function ($m, $q) { return $m->refSQL('HostelRoom')->dsql()->del('field')->field($q->dsql()->expr('sum((select count(*) from `hostel_allotement` where `hostel_allotement`.`room_id` = `rooms`.`id` AND `hostel_allotement`.session_id = ' . $m->add('Model_Sessions_Current')->tryLoadAny()->get('id') . ' ))')); }); // $this->addExpression('alloted')->set(function ($m,$q){ // $x= $m->refSQL('HostelRoom')->sum(''); // echo $x; // return $x; // }); // $this->_dsql()->del('order')->order('Rooms','asc'); $this->addExpression("vacant")->set('building_name'); //->display('diff'); $this->addHook('beforeSave', $this); $this->addHook('beforeDelete', $this); }
function init() { parent::init(); $f = $this->addField('namespace')->hint('Unique name, Variable rules applied')->mandatory(true)->group('a~4~<i class="fa fa-info"></i> Component Information'); $f->icon = 'fa fa-lock~red'; $f = $this->addField('type')->enum(array('element', 'module', 'application', 'plugin'))->group('a~4'); $f->icon = 'fa fa-question~red'; $f = $this->addField('name')->mandatory(true)->group('a~4'); $f->icon = 'fa fa-wrench~red'; // $this->addField('is_final')->type('boolean')->defaultValue(false); // $this->addField('rate')->type('number'); $this->addField('allowed_children')->hint('comma separated ids of allowed children, mark final for none, and \'all\' for all'); $this->addField('specific_to')->hint('comma separated ids of specified parent ids only, leave blank for none, and \'body\' for root only'); $this->addField('is_system')->type('boolean')->defaultValue(false)->hint('System compoenets are not available to user for installation'); $this->addField('description')->type('text')->display(array('grid' => 'text')); // $this->addField('plugin_hooked')->type('text'); $this->addField('default_enabled')->type('boolean')->defaultValue(true); $this->addField('has_toolbar_tools')->type('boolean')->defaultValue(false)->caption('Tools')->group('b~3~<i class="fa fa-cog"></i> Component Options'); $this->addField('has_owner_modules')->type('boolean')->defaultValue(false)->caption('Owner Module')->group('b~3'); $this->addField('has_plugins')->type('boolean')->defaultValue(false)->caption('Plugins')->group('b~3'); $this->addField('has_live_edit_app_page')->type('boolean')->defaultValue(false)->caption('Has Front App')->group('b~3'); $this->addField('git_path')->group('c~8~<i class="fa fa-github"></i> GitHub Configuration'); $this->addField('initialize_and_clone_from_git')->type('boolean')->defaultValue(true)->group('c~4'); $this->addField('category')->hint('admin,components,website,marketing or new ... If unique a new menu will get created.'); $this->hasMany('InstalledComponents', 'component_id'); $this->hasMany('Tools', 'component_id'); $this->hasMany('Plugins', 'component_id'); $this->addHook('beforeSave', $this); $this->addHook('beforeDelete', $this); // $this->add('dynamic_model/Controller_AutoCreator'); }
function init() { parent::init(); $this->hasMany('Item', 'category_id'); $this->addField('name')->caption('Category')->mandatory("Please provide a name")->display('hindi'); $this->addHook('beforeDelete', $this); }
function init() { parent::init(); $this->hasOne("MainBlock", "main_block_id")->caption("Block Name"); $this->hasOne("ExamClassMap", "exammap_id")->caption("Exam"); $this->addField('max_marks')->display(array('grid' => 'grid/inline')); }
function init() { parent::init(); $this->hasOne('Diseases', 'disease_id'); $this->addField('remarks')->type('text')->mandatory('It is Must'); $this->addField('created_at')->type('datetime')->defaultValue(date('Y-m-d H:i:s')); }
function init() { parent::init(); $this->hasOne('Item_Category', 'category_id')->display(array('grid' => 'hindi'))->mandatory("Select Category First"); $this->addField('name')->caption('Item')->display('hindi'); // $this->addField('category'); $this->addField('is_stationory')->type('boolean')->system(true); $this->addField('stock')->system(true); $this->hasMany('Item_Inward', 'item_id'); $this->hasMany('Item_Issue', 'item_id'); $this->addExpression("LastPurchasePrice")->set(function ($m, $q) { return $m->refSQL('Item_Inward')->dsql()->del('field')->field('rate')->limit(1)->order('id', 'desc'); }); $this->addExpression("CurrentInwardStock")->set(function ($m, $q) { $itm = $m->add('Model_Item_Inward'); $itm->join('bill_master.id', 'bill_id')->addField('session_id'); $itm->addCondition('session_id', $m->add('Model_Sessions_Current')->tryLoadAny()->get('id')); $itm->addCondition('item_id', $m->getField('id')); return $itm->sum('quantity'); })->caption('Inward Stock (current year)'); $this->addExpression("TotalInwardStock")->set(function ($m, $q) { $itm = $m->add('Model_Item_Inward'); $itm->join('bill_master.id', 'bill_id')->addField('session_id'); $itm->addCondition('item_id', $m->getField('id')); return $itm->sum('quantity'); })->caption('Inward Stock (current year)'); // $this->debug(); $this->addExpression("TotalIssued")->set(function ($m, $q) { return $m->refSQL("Item_Issue")->sum('quantity'); })->caption('Total Issue Qty'); $this->addExpression("instock")->set('id')->display(array("grid" => 'instock')); $this->addHook('beforeDelete', $this); $this->add('dynamic_model/Controller_AutoCreator'); }
function init() { parent::init(); $this->addField('party_name'); $this->addField('contact'); $this->addField('address'); }
function init() { parent::init(); $this->addField('file'); $this->addField('atk_user_id')->refModel('Model_ATK_User'); $this->addField('datetime')->defaultValue(date('Y-m-d H-i-s')); }
function init() { parent::init(); $this->addField("session_id"); $this->addField("data")->datatype("text"); $this->addField("timestamp")->datatype("text"); }
function init() { parent::init(); //$this->api->addHook('after-init',function($m){ //$m->add('dynamic_model/Controller_AutoCreator'); //}); }
function init() { parent::init(); $this->addField('code'); $this->addField('name'); $this->addField('eu_member'); }
function init() { parent::init(); $this->addField('quantity')->type('int'); $this->addField('rate')->type('int'); $this->addField('date')->type('date'); }
function init() { parent::init(); $this->addField('email'); $this->addField('password'); $this->addField('name'); $this->addExpression('name')->set('concat(email," ",password)'); }
function init() { parent::init(); $this->addField('disease'); $this->addField('report_date')->type('date'); $this->addField('treatment'); $this->addField('treatment_date')->type('date'); }