本文整理汇总了PHP中Groups::getById方法的典型用法代码示例。如果您正苦于以下问题:PHP Groups::getById方法的具体用法?PHP Groups::getById怎么用?PHP Groups::getById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Groups
的用法示例。
在下文中一共展示了Groups::getById方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteAction
/**
* Delete a Hotel Type
*/
public function deleteAction()
{
$Group = Groups::getById($this->getRequest()->getParam('id'));
if ($Group) {
if ($this->getRequest()->isPost()) {
$Group->delete();
$this->Member->log('Delete hotel type:' . $Group->name . '(' . $this->getRequest()->getParam('id') . ')', 'Groups');
$this->_redirect($this->_helper->url('index', 'Groups', 'admin'));
}
$this->view->Groups = $Group;
}
}
示例2: deleteAction
public function deleteAction()
{
$Group = Groups::getById($this->getRequest()->getParam('id'));
if ($Group) {
if ($this->getRequest()->isPost()) {
$Group->delete();
My_Plugin_Libs::setSplash('Nhóm thành viên:<b>' . $Group->name . '</b> đã được xóa khổi hệ thống.');
$this->Member->log('Xóa nhóm thành viên:' . $Group->name . '(' . $this->getRequest()->getParam('id') . ')', 'Groups');
$this->_redirect($this->_helper->url('index', 'Group', 'admin'));
}
$this->view->Group = $Group;
}
}
示例3: getMemberType
public function getMemberType()
{
return Groups::getById($this->member_type)->name;
}
示例4: loginAction
public function loginAction()
{
$this->_helper->layout->disableLayout();
if ($this->getRequest()->isPost()) {
$email = $this->getRequest()->getParam('username');
$password = $this->getRequest()->getParam('password');
$Members = Members::setLogin($email, $password);
if ($Members) {
$Members->setLastLogin();
$_SESSION['Member'] = $Members;
$_SESSION['Role'] = Zend_Json::decode(Groups::getById($Members->member_type)->role);
$this->_redirect('admin');
} else {
$this->view->error = 'Login incorrect';
}
}
}
示例5: loginAction
public function loginAction()
{
$this->_helper->layout->disableLayout();
if ($this->getRequest()->isPost()) {
$email = $this->getRequest()->getParam('username');
$password = $this->getRequest()->getParam('password');
if ($email && $password) {
$Members = Members::setLogin($email, $password);
if ($Members) {
$Members->setLastLogin();
$ss = new Zend_Session_Namespace('member');
$ss->__set('Member', $Members);
$ss->__set('Role', Zend_Json::decode(Groups::getById($Members->member_type)->role));
// $ss->Member = $Members;
// $ss->Role = Zend_Json::decode ( Groups::getById ( $Members->member_type )->role );
$this->_redirect('admin');
} else {
$this->view->error = 'Login incorrect';
}
} else {
$this->view->error = 'Login: usename and password is required!';
}
}
}