public function listAction() { $searchfor = $this->_request->getParam('searchfor'); $filters = ''; $profile = new GenericProfile(); $member = new MemberProfile(); $select = $member->getSelectStatement(); // $oRetailer = new RetailersObject(); // $selectRetailer = $oRetailer->getAll(null, false); // $selectRetailer->joinRight( // $profile->getGenericTable(), // 'R_GenericProfileId = GP_MemberID', // array( // 'lastName' => 'GP_LastName', // 'firstName' => 'GP_FirstName', // 'email' => 'GP_Email') // ); // // $select = $selectRetailer->joinRight( // $member->getTable(), // 'GP_MemberID = MP_GenericProfileMemberID', // array( // 'member_id' => 'MP_GenericProfileMemberID', // 'MP_Status' => 'MP_Status') // ); $tables = array('GenericProfiles' => array('GP_LastName', 'GP_FirstName', 'GP_Email'), 'RetailersData' => array('R_ID', 'R_GenericProfileID', 'R_AddressId', 'R_Status')); $field_list = array('lastName' => array('width' => '150px'), 'firstName' => array('width' => '150px'), 'email' => array('width' => '300px')); $options = array('commands' => array($this->view->link($this->view->url(array('controller' => 'index', 'action' => 'add')), $this->view->getCibleText('button_add_profile'), array('class' => 'action_submit add'))), 'disable-export-to-excel' => '', 'filters' => array('filter_2' => array('label' => 'Liste des détaillants', 'default_value' => null, 'associatedTo' => 'MP_Status', 'choices' => array('' => 'Désactivé', '0' => 'Email non validé', '1' => 'À valider', '2' => 'Activé'))), 'action_panel' => array('width' => '50', 'actions' => array('edit' => array('label' => $this->view->getCibleText('menu_submenu_action_edit'), 'url' => $this->view->url(array('action' => 'edit', 'ID' => "-ID-")), 'findReplace' => array('search' => '-ID-', 'replace' => 'member_id')), 'delete' => array('label' => $this->view->getCibleText('menu_submenu_action_delete'), 'url' => $this->view->url(array('action' => 'delete', 'ID' => '-ID-')), 'findReplace' => array('search' => '-ID-', 'replace' => 'member_id'))))); $mylist = new Cible_Paginator($select, $tables, $field_list, $options); $this->view->assign('mylist', $mylist); }
/** * Retrieve the registred users with managers privileges. * * @return array */ public static function getClientWithManagerPrivileges() { $db = Zend_Registry::get("db"); $profile = new MemberProfile(); $select = $profile->getSelectStatement(); // $select->where('MP_IsDetaillant = ?', 1); $select->order('company'); $select->order('lastName'); $select->order('firstName'); return $db->fetchAll($select); }