예제 #1
0
 /**
  * Function for preparing the data for insertion in an SQL query
  * (The service handles insertion)
  *
  * @param array $post Data from submit_post
  * @param array $pre_create_data Data from pre_create_insert_array()
  *
  * @return array Array of data ready to be inserted into the database
  */
 public function create_insert_array($post, $pre_create_data = array())
 {
     $this->set_data('disapprove_reason', $post['disapprove_reason']);
     $data = parent::create_insert_array($post);
     $this->notification_time = $data['notification_time'] = time();
     return $data;
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function get_insert_array()
 {
     $data = parent::get_insert_array();
     $data['notification_time'] = $this->notification_time;
     return $data;
 }