예제 #1
0
 protected function get_relation_array($relation_info, $primary_key_value = null, $limit = null)
 {
     list($field_name, $related_table, $related_field_title, $where_clause, $order_by) = $relation_info;
     if ($primary_key_value !== null) {
         $primary_key = $this->basic_model->get_primary_key($related_table);
         //A where clause with the primary key is enough to take the selected key row
         $where_clause = array($primary_key => $primary_key_value);
     }
     $relation_array = $this->basic_model->get_relation_array($field_name, $related_table, $related_field_title, $where_clause, $order_by, $limit);
     return $relation_array;
 }