当前位置: 首页>>代码示例>>PHP>>正文


PHP Groups::getById方法代码示例

本文整理汇总了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;
     }
 }
开发者ID:hoaitn,项目名称:base-zend,代码行数:15,代码来源:GroupController.php

示例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;
     }
 }
开发者ID:hoaitn,项目名称:bmw-site,代码行数:13,代码来源:GroupController.php

示例3: getMemberType

 public function getMemberType()
 {
     return Groups::getById($this->member_type)->name;
 }
开发者ID:hoaitn,项目名称:base-zend,代码行数:4,代码来源:Members.php

示例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';
         }
     }
 }
开发者ID:hoaitn,项目名称:base-zend,代码行数:17,代码来源:MemberController.php

示例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!';
         }
     }
 }
开发者ID:hoaitn,项目名称:base-zend,代码行数:24,代码来源:MemberController.php


注:本文中的Groups::getById方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。