===== サンプル - cakephp - model(2) ===== $this->get_fields, 'order' => array('CreditItem.id'), ); if (!is_null($item_id)) { $con = array('conditions' => array("id" => $item_id)); $params = array_merge($params,$con); } $retVal = $this->find('all', $params); return $this->formatDate($retVal); } public function formatDate($params) { foreach ($params as $row) { $array[] = $row['CreditItem']; } $retVal = array('CreditItem' => $array); return $retVal; } }