Function for preparing the data for insertion in an SQL query
(The service handles insertion)
/** * {@inheritdoc} */ public function create_insert_array($post, $pre_create_data = array()) { parent::create_insert_array($post, $pre_create_data); $this->notification_time = time(); }
/** * 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('post_subject', $post['post_subject']); $data = parent::create_insert_array($post, $pre_create_data); $this->notification_time = $data['notification_time'] = time(); return $data; }
/** * {@inheritdoc} */ public function create_insert_array($post, $pre_create_data = array()) { $this->set_data('closer_id', $post['closer_id']); parent::create_insert_array($post, $pre_create_data); $this->notification_time = time(); }