Exemplo n.º 1
0
 public function get_array_tpl_vars($page = 1)
 {
     $user = $this->get_author_user();
     $user_group_color = User::get_group_color($user->get_groups(), $user->get_level(), true);
     return array('C_EDIT' => $this->is_authorized_to_edit(), 'C_DELETE' => $this->is_authorized_to_delete(), 'C_AUTHOR_EXIST' => $user->get_id() != User::VISITOR_LEVEL, 'C_USER_GROUP_COLOR' => !empty($user_group_color), 'ID' => $this->id, 'CONTENTS' => FormatingHelper::second_parse(stripslashes($this->contents)), 'DATE' => $this->creation_date->format(Date::FORMAT_DAY_MONTH_YEAR_HOUR_MINUTE), 'DATE_DAY' => $this->creation_date->get_day(), 'DATE_MONTH' => $this->creation_date->get_month(), 'DATE_YEAR' => $this->creation_date->get_year(), 'DATE_ISO8601' => $this->creation_date->format(Date::FORMAT_ISO8601), 'PSEUDO' => $this->login ? $this->login : $user->get_display_name(), 'USER_LEVEL_CLASS' => UserService::get_level_class($user->get_level()), 'USER_GROUP_COLOR' => $user_group_color, 'U_ANCHOR' => ShoutboxUrlBuilder::home($page, $this->id)->rel(), 'U_AUTHOR_PROFILE' => UserUrlBuilder::profile($this->get_author_user()->get_id())->rel(), 'U_EDIT' => ShoutboxUrlBuilder::edit($this->id, $page)->rel(), 'U_DELETE' => ShoutboxUrlBuilder::delete($this->id)->rel());
 }