Get information about a profile group where a user is member of.
public static getProfileGroup ( integer $id ) : array | ||
$id | integer | Membership id. |
리턴 | array |
/** * Execute the action. */ public function execute() { // get parameters $this->id = $this->getParameter('id', 'int'); // does the item exist if ($this->id !== null && BackendProfilesModel::existsProfileGroup($this->id)) { // call parent, this will probably add some general CSS/JS or other required files parent::execute(); // get profile group $profileGroup = BackendProfilesModel::getProfileGroup($this->id); // delete profile group BackendProfilesModel::deleteProfileGroup($this->id); // trigger event BackendModel::triggerEvent($this->getModule(), 'after_profile_delete_from_group', array('id' => $this->id)); // profile group was deleted, so redirect $this->redirect(BackendModel::createURLForAction('edit') . '&id=' . $profileGroup['profile_id'] . '&report=membership-deleted#tabGroups'); } else { $this->redirect(BackendModel::createURLForAction('index') . '&error=non-existing'); } }
/** * Get the data about group rights. */ private function getData() { $this->profileGroup = BackendProfilesModel::getProfileGroup($this->id); }