Beispiel #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('post_subject', $post['post_subject']);
     $data = parent::create_insert_array($post, $pre_create_data);
     $this->notification_time = $data['notification_time'] = time();
     return $data;
 }
Beispiel #2
0
 /**
  * Get email template variables
  *
  * @return array
  */
 public function get_email_template_variables()
 {
     $user_data = $this->user_loader->get_user($this->get_data('poster_id'));
     return array_merge(parent::get_email_template_variables(), array('AUTHOR_NAME' => htmlspecialchars_decode($user_data['username'])));
 }