Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 535 | Rev 4733 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 535 Rev 3639
Línea 65... Línea 65...
65
    /**
65
    /**
66
     *
66
     *
67
     * @param string $search
67
     * @param string $search
68
     * @param int $page
68
     * @param int $page
69
     * @param string $status
69
     * @param string $status
-
 
70
     * @param int $network_id
70
     * @param int $records_per_page
71
     * @param int $records_per_page
71
     * @param string $order_field
72
     * @param string $order_field
72
     * @param string $order_direction
73
     * @param string $order_direction
73
     * @return Paginator
74
     * @return Paginator
74
     */
75
     */
75
    public function fetchAllDataTable($search, $page = 1, $status,  $records_per_page = 10, $order_field= 'name', $order_direction = 'ASC')
76
    public function fetchAllDataTable($search, $page = 1, $status, $network_id,  $records_per_page = 10, $order_field= 'name', $order_direction = 'ASC')
76
    {
77
    {
77
        $prototype = new Company();
78
        $prototype = new Company();
78
        $select = $this->sql->select(self::_TABLE);
79
        $select = $this->sql->select(self::_TABLE);
Línea 84... Línea 85...
84
        
85
        
85
        if($status) {
86
        if($status) {
86
            $select->where->equalTo('status', $status);
87
            $select->where->equalTo('status', $status);
Línea -... Línea 88...
-
 
88
        }
-
 
89
        
-
 
90
        if($network_id) {
-
 
91
            $select->where->equalTo('network_id', $network_id);
-
 
92
        }
87
        }
93
        
Línea 88... Línea 94...
88
        
94
        
89
        $select->order($order_field . ' ' . $order_direction);
95
        $select->order($order_field . ' ' . $order_direction);
Línea 147... Línea 153...
147
        $select->where->equalTo('id', $id);
153
        $select->where->equalTo('id', $id);
Línea 148... Línea 154...
148
        
154
        
149
        return $this->executeFetchOneObject($select, $prototype);
155
        return $this->executeFetchOneObject($select, $prototype);
Línea -... Línea 156...
-
 
156
    }
-
 
157
    
-
 
158
    
-
 
159
    /**
-
 
160
     *
-
 
161
     * @param int $network_id
-
 
162
     * @return Company
-
 
163
     */
-
 
164
    public function fetchDefaultForNetworkByNetworkId($network_id)
-
 
165
    {
-
 
166
        $prototype = new Company;
-
 
167
        $select = $this->sql->select(self::_TABLE);
-
 
168
        $select->where->equalTo('default_for_network', Company::DEFAULT_FOR_NETWORK_YES);
-
 
169
        $select->where->equalTo('network_id', $network_id);
-
 
170
        
-
 
171
        return $this->executeFetchOneObject($select, $prototype);
-
 
172
    }
-
 
173
    
-
 
174
    
-
 
175
    /**
-
 
176
     *
-
 
177
     * @param int $id
-
 
178
     * @param int $network_id
-
 
179
     * @return Company
-
 
180
     */
-
 
181
    public function fetchOneByIdAndNetworkId($id, $network_id)
-
 
182
    {
-
 
183
        $prototype = new Company;
-
 
184
        $select = $this->sql->select(self::_TABLE);
-
 
185
        $select->where->equalTo('id', $id);
-
 
186
        $select->where->equalTo('network_id', $network_id);
-
 
187
        
-
 
188
        return $this->executeFetchOneObject($select, $prototype);
150
    }
189
    }
151
    
190
    
Línea 152... Línea 191...
152
    /**
191
    /**
153
     *
192
     *
Línea 176... Línea 215...
176
        
215
        
177
        return $this->executeFetchOneObject($select, $prototype);
216
        return $this->executeFetchOneObject($select, $prototype);
Línea 178... Línea 217...
178
    }
217
    }
-
 
218
    
-
 
219
    /**
-
 
220
     *
-
 
221
     * @param string $uuid
-
 
222
     * @param int $network_id
-
 
223
     * @return Company
-
 
224
     */
-
 
225
    public function fetchOneByUuidAndNetworkId($uuid, $network_id)
-
 
226
    {
-
 
227
        $prototype = new Company;
-
 
228
        $select = $this->sql->select(self::_TABLE);
-
 
229
        $select->where->equalTo('uuid', $uuid);
-
 
230
        $select->where->equalTo('network_id', $network_id);
-
 
231
        
-
 
232
        return $this->executeFetchOneObject($select, $prototype);
-
 
233
    }
179
    
234
    
180
    /**
235
    /**
181
     * 
236
     * 
182
     * @param Company $company
237
     * @param Company $company
183
     * @return boolean
238
     * @return boolean