PluginProbe
ShiftController Employee Shift Scheduling / 2.2.3
ShiftController Employee Shift Scheduling v2.2.3
4.9.97 4.9.96 4.9.95 4.9.74 4.9.75 4.9.76 4.9.77 4.9.78 4.9.84 4.9.85 4.9.87 4.9.91 4.9.92 trunk 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 3.2.4 All 38 releases
shiftcontroller / application / models / location_model.php

location_model.php in ShiftController Employee Shift Scheduling 2.2.3, at application/models/location_model.php

45 lines 805 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 class Location_model extends MY_model
3 {
4 var $table = 'locations';
5 var $allow_none = FALSE;
6 var $default_order_by = array('show_order' => 'ASC');
7 var $build_title = array(
8 '_name_'
9 );
10
11 var $has_many = array(
12 'shift' => array(
13 'class' => 'shift_model',
14 'other_field' => 'location',
15 ),
16 );
17
18 var $validation = array(
19 'name' => array(
20 'label' => 'lang:location_name',
21 'rules' => array('required', 'trim', 'max_length' => 50, 'unique')
22 )
23 );
24
25 var $my_fields = array(
26 array(
27 'name' => 'name',
28 'label' => 'lang:location_name',
29 'size' => 24,
30 'required' => TRUE,
31 ),
32 );
33
34 public function title( $html = FALSE )
35 {
36 $return = '';
37 if( $html )
38 {
39 $return .= '<i class="fa fa-home"></i> ';
40 }
41
42 $return .= parent::title();
43 return $return;
44 }
45 }