Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function get_insert_array()
 {
     $data = parent::get_insert_array();
     $data['notification_time'] = $this->notification_time;
     return $data;
 }
Пример #2
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, $pre_create_data);
     $this->notification_time = $data['notification_time'] = time();
     return $data;
 }