public function executeTeamNotepad(sfWebRequest $request) { $this->person_role = PersonRolePeer::getByPersonIdOne($this->getUser()->getId()); $s_role = RolePeer::getByTitle('Staff'); $a_role = RolePeer::getByTitle('Administrator'); $role_ids = array(); // foreach ($person_roles as $person_role){ // $roleId = $person_role->getRoleId(); // $s_role_id = $s_role->getId(); // if($roleId==$s_role_id){ // $role_ids[] = $a_role->getId(); // }else{ // $role_ids[] = $roleId; // } // } $team_notes = ""; if ($this->person_role) { $team_notes = TeamNotePeer::getTeamNote(); } $this->team_notes = $team_notes; $this->allowed_tags = $this->getAllowedTags(); }
public function executeReloadTeamNote() { $this->person_role = PersonRolePeer::getByPersonIdOne($this->getUser()->getId()); $s_role = RolePeer::getByTitle('Staff'); $a_role = RolePeer::getByTitle('Admin'); $role_ids = array(); $team_notes = array(); if ($this->person_role) { $team_notes = TeamNotePeer::getTeamNote(); } $content = ""; $allowed_tags = sfConfig::get('app_allowed_note_tags', ''); foreach ($team_notes as $team_note) { $content .= strip_tags($team_note->getNote(), $allowed_tags); } return $this->renderText($content); }