| Línea 77... |
Línea 77... |
| 77 |
}
|
77 |
}
|
| 78 |
public function fetchAllDataTableInnerJoinMember($search, $page = 1, $records_per_page = 10, $order_field= 'title', $order_direction = 'ASC', $user_id)
|
78 |
public function fetchAllDataTableInnerJoinMember($search, $page = 1, $records_per_page = 10, $order_field= 'title', $order_direction = 'ASC', $user_id)
|
| 79 |
{
|
79 |
{
|
| 80 |
$prototype = new HighPerformanceTeamsGroups();
|
80 |
$prototype = new HighPerformanceTeamsGroups();
|
| 81 |
$select = $this->sql->select();
|
81 |
$select = $this->sql->select();
|
| 82 |
$select->from(['g' => self::_TABLE]);
|
82 |
$select->from(['gm' => HighPerformanceTeamsGroupsMembersMapper::_TABLE]);
|
| 83 |
$select->join(['gm' => HighPerformanceTeamsGroupsMembersMapper::_TABLE], 'gm.group_id = g.id', []);
|
83 |
$select->join(['g' => self::_TABLE], 'gm.group_id = g.id', []);
|
| 84 |
$select->where->equalTo('gm.user_id', $user_id);
|
84 |
$select->where->equalTo('gm.user_id', $user_id);
|
| 85 |
$select->where->notEqualTo('gm.status', HighPerformanceTeamsGroupsMembers::STATUS_DELETE);
|
85 |
$select->where->notEqualTo('gm.status', HighPerformanceTeamsGroupsMembers::STATUS_DELETE);
|
| 86 |
|
- |
|
| 87 |
|
86 |
|
| 88 |
if($search) {
|
87 |
if($search) {
|
| 89 |
$select->where->like('title', '%' . $search . '%');
|
88 |
$select->where->like('title', '%' . $search . '%');
|
| 90 |
}
|
89 |
}
|
| 91 |
$select->order($order_field . ' ' . $order_direction);
|
90 |
$select->order($order_field . ' ' . $order_direction);
|
| Línea -... |
Línea 91... |
| - |
|
91 |
|
| - |
|
92 |
|
| 92 |
|
93 |
|
| 93 |
$hydrator = new ObjectPropertyHydrator();
|
94 |
$hydrator = new ObjectPropertyHydrator();
|
| Línea 94... |
Línea 95... |
| 94 |
$resultset = new HydratingResultSet($hydrator, $prototype);
|
95 |
$resultset = new HydratingResultSet($hydrator, $prototype);
|
| 95 |
|
96 |
|