本文整理汇总了PHP中Application_Model_User类的典型用法代码示例。如果您正苦于以下问题:PHP Application_Model_User类的具体用法?PHP Application_Model_User怎么用?PHP Application_Model_User使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Application_Model_User类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: init
public function init()
{
//get user lsit
$userM = new Application_Model_User();
$usersArr = $userM->getUsersList(null, '--- Select Author ---');
$this->addElement('select', 'userId', array('label' => 'Author:', 'style' => 'width: 313px;', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select author.')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim'), 'MultiOptions' => $usersArr));
$categories = new Application_Model_Category();
$categoriesArr = $categories->getCategory("--- Select Category ---", "advice");
$this->addElement('select', 'categoryId', array('label' => 'Category:', 'style' => 'width: 313px;', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select advice category.')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim'), 'MultiOptions' => $categoriesArr));
$this->addElement('text', 'title', array('label' => 'Title :', 'class' => 'title-input-box', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'You must enter the advice title')))), 'decorators' => $this->elementDecorators));
$this->addElement('text', 'identifire', array('label' => 'URL Re-write :', 'class' => 'title-input-box', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'You must enter the advice URL Re-write')))), 'decorators' => $this->elementDecorators));
// Add an body element
$this->addElement('textarea', 'content', array('label' => 'Content:', 'required' => false, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'You must enter the page content')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
// Add an body element
$this->addElement('textarea', 'synopsis', array('label' => 'Synopsis:', 'required' => false, 'class' => 'title-input-box', 'cols' => '50', 'rows' => '3', 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'You must enter the synopsis')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
$this->addElement('textarea', 'metaTitle', array('label' => 'Meta Title :', 'cols' => '50', 'rows' => '3', 'class' => 'title-input-box', 'required' => false, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'You must enter the page identifire')))), 'decorators' => $this->elementDecorators));
$this->addElement('textarea', 'metaKeyword', array('label' => 'Meta Keyword :', 'cols' => '50', 'rows' => '3', 'class' => 'title-input-box', 'required' => false, 'decorators' => $this->elementDecorators));
$this->addElement('textarea', 'metaDescription', array('label' => 'Meta Description :', 'class' => 'title-input-box', 'cols' => '50', 'rows' => '3', 'required' => false, 'decorators' => $this->elementDecorators));
$Name = new Zend_Form_Element_File('name');
$Name->setLabel('Upload an image:')->setRequired(false)->addValidator('Extension', false, 'jpg,png,gif')->clearDecorators()->addDecorators($this->fileDecorators);
$this->addElements(array($Name));
$this->addElement('submit', 'savePublish', array('required' => false, 'ignore' => true, 'title' => 'Save and Publish', 'label' => 'Save and Publish', 'decorators' => $this->buttonDecorators));
$this->addElement('submit', 'saveUnpublish', array('required' => false, 'ignore' => true, 'title' => 'Save and Unpublish', 'label' => 'Save and Unpublish', 'decorators' => $this->buttonDecorators));
$this->addElement('submit', 'previewPage', array('required' => false, 'ignore' => true, 'title' => 'Preview Page', 'label' => 'Preview Page', 'decorators' => $this->buttonDecorators));
}
开发者ID:riteshsahu1981,项目名称:we,代码行数:25,代码来源:Advice.php
示例2: addUserPrivilegeAction
public function addUserPrivilegeAction()
{
$request = $this->getRequest();
$form = new Application_Form_UserPrivilege();
if ($request->isPost()) {
$options = $request->getPost();
if ($form->isValid($options)) {
//$options['status']='active';
$model = new Application_Model_User($options);
$id = $model->save();
if ($id) {
/*--------- Upload image START -------------------------*/
$model->uploadProfilePicture($id, $options);
/*--------- Upload image END -------------------------*/
$this->_flashMessenger->addMessage(array('success' => 'User added successfully!'));
$this->_helper->_redirector->gotoUrl($this->view->seoUrl('/admin/user/add-new-user'));
} else {
$this->_flashMessenger->addMessage(array('error' => 'Failed to add user!'));
$this->_helper->_redirector->gotoUrl($this->view->seoUrl('/admin/user/add-new-user'));
}
$form->reset();
} else {
$form->reset();
$form->populate($options);
}
}
$this->view->form = $form;
}
开发者ID:riteshsahu1981,项目名称:Weadvance,代码行数:28,代码来源:UserPrivilegeController.php
示例3: find
public function find($id, Application_Model_User $user)
{
$result = $this->getDbTable()->find($id);
if (0 === count($result)) {
return;
}
$user->setOptions($result->current()->toArray());
}
开发者ID:jingjangjung,项目名称:WinsAndWants,代码行数:8,代码来源:UserMapper.php
示例4: find
public function find($articleId, Application_Model_User $article)
{
$result = $this->getDbTable()->find($articleId);
if (0 == count($result)) {
return;
}
$row = $result->current();
$article->setArticleId($row->articleId)->setArticleTitle($row->articleTitle)->setArticleValue($row->articleValue)->setArticleLastEdit($row->articleLastEdit)->setUserId($row->userId);
}
开发者ID:rguetlin,项目名称:blog,代码行数:9,代码来源:ArticleMapper.php
示例5: recoverUsername
public function recoverUsername(Application_Model_User $user)
{
$options['email'] = $user->getEmail();
$options['username'] = $user->getUsername();
$options['firstName'] = $user->getFirstName();
$options['lastName'] = $user->getLastName();
$Mail = new Base_Mail();
$Mail->sendForgotUsernameMail($options);
}
开发者ID:riteshsahu1981,项目名称:we,代码行数:9,代码来源:Auth.php
示例6: addAction
public function addAction()
{
if ($this->_request->isPost()) {
$user_data = $this->_request->getParams();
$user = new Application_Model_User();
$user->addUser($user_data);
//$this->view->user_data=$user_data;
//$this->render();
}
}
开发者ID:abeinoo,项目名称:Zend,代码行数:10,代码来源:UserController.php
示例7: fetchAll
public function fetchAll()
{
$resultSet = $this->getDbTable()->fetchAll();
$users = array();
foreach ($resultSet as $row) {
$user = new Application_Model_User();
$user->setUserId($row->userId)->setUserName($row->userName)->setUserPassword($row->userPassword)->setUserReg($row->userRegDate)->setUserLastLogin($row->userLastLogin);
$users[] = $user;
}
return $users;
}
开发者ID:rguetlin,项目名称:blog,代码行数:11,代码来源:UserMapper.php
示例8: init
public function init()
{
$this->setName('frmBookUser');
$model = new Application_Model_User();
$users = $model->getAllUsers("active");
$this->addElement('select', 'userId', array('label' => 'Employee:', 'style' => 'width:193px', 'class' => 'text-input small-input', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select user.')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim'), 'MultiOptions' => $users));
$this->addElement('text', 'issueDate', array('label' => 'Issue Date:', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please enter issue date')))), 'class' => 'text-input medium-input', 'readonly' => 'true', 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
$this->addElement('text', 'estimatedReturnDate', array('label' => 'Estimated Return Date:', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please enter estimated return date')))), 'class' => 'text-input medium-input', 'readonly' => 'true', 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
$this->addElement('text', 'returnDate', array('label' => 'Return Date:', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please enter return date')))), 'class' => 'text-input medium-input', 'readonly' => 'true', 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
$this->addElement('submit', 'submit', array('required' => false, 'class' => 'button', 'ignore' => true, 'label' => 'Submit', 'value' => 'submit', 'decorators' => $this->buttonDecorators));
}
开发者ID:riteshsahu1981,项目名称:we,代码行数:11,代码来源:BookUser.php
示例9: fetchAll
public function fetchAll()
{
$resultSet = $this->getDbTable()->fetchAll();
$entries = array();
foreach ($resultSet as $row) {
$entry = new Application_Model_User();
$entry->setId($row->id)->setPassword($row->password)->setUserName($row->username);
$entries[] = $entry;
}
return $entries;
}
开发者ID:BGCX262,项目名称:zwh-web-svn-to-git,代码行数:11,代码来源:AccountMapper.php
示例10: init
public function init()
{
$this->setName('frmDepartment');
$this->addElement('text', 'title', array('label' => 'Department Title:', 'autocomplete' => "off", 'class' => 'text-input medium-input', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'You must enter designation title'))), array('Db_NoRecordExists', true, array('table' => 'department', 'field' => 'title', 'messages' => 'department title already exists'))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
$this->addElement('select', 'type', array('label' => 'Type:', 'style' => 'width:193px', 'class' => 'text-input small-input', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select department type.')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim'), 'MultiOptions' => array("normal" => "Normal", "operations" => "Operations")));
$arrUser = array();
$user = new Application_Model_User();
$arrUser = $user->getAllUsers("active");
//$arrUser=array_merge(array(''=>'Select'),$arrUser);
$this->addElement('select', 'departmentHeadId', array('label' => 'Department Head:', 'style' => 'width:193px', 'class' => 'text-input medium-input', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select department head.')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim'), 'MultiOptions' => $arrUser));
$this->addElement('submit', 'submit', array('required' => false, 'class' => 'button', 'ignore' => true, 'label' => 'Submit', 'value' => 'submit', 'decorators' => $this->buttonDecorators));
}
开发者ID:riteshsahu1981,项目名称:we,代码行数:12,代码来源:Department.php
示例11: userAction
public function userAction()
{
$user_model = new Application_Model_User();
$users = $user_model->fetchAll();
$this->view->users = $users;
$review_model = new Application_Model_Review();
$reviews = $review_model->fetchAll();
$this->view->reviews = $reviews;
$song_model = new Application_Model_Song();
$songs = $song_model->fetchAll();
$this->view->songs = $songs;
}
开发者ID:sinaBaharlouei,项目名称:Itunes,代码行数:12,代码来源:ViewController.php
示例12: errorAction
public function errorAction()
{
//$this->_helper->layout->setLayout('home-layout');
$errors = $this->_getParam('error_handler');
$flag = true;
switch ($errors->type) {
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
//var_dump($this->_getParam('controller'));
$userM = new Application_Model_User();
$user = $userM->fetchRow("username='{$this->_getParam('controller')}'");
if ($user !== false) {
$flag = false;
//Forward to the controller
$this->_forward('index', 'profile', 'default', array('id' => $user->getId()));
}
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
$this->getResponse()->setHttpResponseCode(404);
$this->view->message = 'Page not found';
break;
default:
// application error
$this->getResponse()->setHttpResponseCode(500);
$this->view->message = 'Application error';
break;
}
// Log exception, if logger available
if ($log = $this->getLog()) {
$log->crit($this->view->message, $errors->exception);
}
// conditionally display exceptions
//var_dump($this->getInvokeArg('displayExceptions'));
if ($this->getInvokeArg('displayExceptions') == true) {
$this->view->exception = $errors->exception;
}
$this->view->request = $errors->request;
$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application.ini', APPLICATION_ENV);
$this->view->error_flag = $config->error_flag;
//Mail
$options['message'] = $this->view->message;
if ($this->getInvokeArg('displayExceptions') == true) {
$options['exception'] = $this->view->exception->getMessage();
$options['traceString'] = $this->view->exception->getTraceAsString();
}
$options['params'] = $this->view->request->getParams();
$options['requesturi'] = $this->view->request->getRequestUri();
$options['siteurl'] = Zend_Registry::get('siteurl');
$mail = new Base_Mail();
if ($flag == true) {
$mail->sendErrorMail($options);
}
}
开发者ID:riteshsahu1981,项目名称:we,代码行数:52,代码来源:ErrorController.php
示例13: init
public function init()
{
$model = new Application_Model_User();
$arr = $model->getAllUsers();
$arr = array_merge(array('' => 'Select'), $arr);
$this->addElement('select', 'userId', array('label' => 'Employee:', 'class' => 'text-input small-input', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select employee')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim'), 'MultiOptions' => $arr));
$model = new Application_Model_AppriciationType();
$arr = $model->getAppriciationType();
//$arr=array_merge(array(''=>'Select'),$arr);
$this->addElement('select', 'appriciationTypeId', array('label' => 'Appriciation Type:', 'class' => 'text-input small-input', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select type')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim'), 'MultiOptions' => $arr));
$this->addElement('text', 'appriciationDate', array('label' => 'Date:', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please enter date')))), 'class' => 'text-input small-input', 'readonly' => 'true', 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
$this->addElement('textarea', 'remarks', array('label' => 'Remarks:', 'class' => 'text-input textarea address', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please enter remarks.')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
$this->addElement('submit', 'submit', array('required' => false, 'class' => 'button', 'ignore' => true, 'label' => 'Submit', 'value' => 'submit', 'decorators' => $this->buttonDecorators));
}
开发者ID:riteshsahu1981,项目名称:we,代码行数:14,代码来源:Appriciation.php
示例14: createAction
public function createAction()
{
//if($this->getRequest()->isPost()){
//Récupération des données
$user = new Application_Model_User();
$user->setIdUser('1')->setEmailUser('[email protected]')->setNomUser('wallace')->setPrenomUser('grommit')->setAdresse1User('1 rue Albert')->setAdresse2User('')->setZipUser('69380')->setPasswordUser('0000')->setNbMaxEmpruntUser('3')->setDelaisEmpruntUser('24')->setServiceUser('')->setDateInscription('27/01/2014')->setBureauUser('')->setParutionIdParution('')->setActifUser('')->setValidMailUser('')->setActivationUser('');
//Instance du Mapper
$userMapper = new Application_Model_UserMapper();
//Save des données
$userMapper->save($user);
//Réponse à la vue
$this->view->success = 'Enregistrement effectué';
//}
}
开发者ID:anouvene,项目名称:Zeus,代码行数:14,代码来源:UserController.php
示例15: regAction
public function regAction()
{
$request = $this->getRequest();
$form = new Application_Form_UserRegistration();
if ($this->getRequest()->isPost()) {
if ($form->isValid($request->getPost())) {
$user = new Application_Model_User($form->getValues());
$user->setUserReg(date('Y-m-d H:i:s', time()))->setUserLastLogin(date('Y-m-d H:i:s', time()));
$userMapper = new Application_Model_UserMapper();
$userMapper->save($user);
return $this->_helper->redirector('index,', 'index');
}
}
$this->view->form = $form;
}
开发者ID:rguetlin,项目名称:blog,代码行数:15,代码来源:UserController.php
示例16: _isValid
/**
* Checks whether this contest ready to be saved.
*
* @access protected
* @return boolean
*/
protected function _isValid()
{
if ($this->_user instanceof Application_Model_User) {
if ($this->_user->getId()) {
if ($this->_user->canCreateContest()) {
if ($this->name) {
if ($this->startdate && $this->enddate || $this->type == 3) {
if ($this->type) {
if ($this->already_played_msg && $this->before_contest_msg && $this->after_contest_msg) {
return true;
} else {
$this->setError('A contest requires a messages for before the contest, after the contest and already played subscibers.');
}
} else {
$this->setError('A contest type must be selected.');
}
} else {
$this->setError('You must enter a start and end date for this contest to run.');
}
} else {
$this->setError('You must name the contest.');
}
} else {
$this->setError('User can not create Contests, upgrade to a Premium user for this feature.');
}
} else {
$this->setError('Invalid user');
}
} else {
$this->setError('A user must be supplied to create a contest');
}
return false;
}
开发者ID:fniftaly,项目名称:Java-Selenium,代码行数:39,代码来源:Contest.php
示例17: indexAction
public function indexAction()
{
$user_session = new Zend_Session_Namespace('user');
$this->view->defaultCurrency = '';
$this->view->bpartnerAdminDisabled = 1;
$this->view->supplierAdmin = 0;
$this->view->customerAdmin = 0;
$this->view->editDisable = 1;
$this->view->user_id = 0;
if (isset($user_session->user_info)) {
$this->view->user_id = $user_session->user_info['user_id'];
if (Application_Model_User::checkPermissionByRoleName('业务伙伴管理员')) {
$this->view->bpartnerAdminDisabled = 0;
$this->view->editDisable = 0;
}
if (Application_Model_User::checkPermissionByRoleName('供应商管理员') || Application_Model_User::checkPermissionByRoleName('系统管理员')) {
$this->view->supplierAdmin = 1;
$this->view->editDisable = 0;
}
if (Application_Model_User::checkPermissionByRoleName('客户管理员') || Application_Model_User::checkPermissionByRoleName('系统管理员')) {
$this->view->customerAdmin = 1;
$this->view->editDisable = 0;
}
}
$currency = new Erp_Model_Setting_Currency();
$this->view->defaultCurrency = $currency->getDefaultCurrency();
}
开发者ID:xindalu,项目名称:evolve,代码行数:27,代码来源:PricelistController.php
示例18: indexAction
public function indexAction()
{
$this->view->customerAdmin = 0;
if (Application_Model_User::checkPermissionByRoleName('客户管理员') || Application_Model_User::checkPermissionByRoleName('系统管理员')) {
$this->view->customerAdmin = 1;
}
}
开发者ID:xindalu,项目名称:evolve,代码行数:7,代码来源:CustomercontactController.php
示例19: _initHeadScript
protected function _initHeadScript()
{
global $CC_CONFIG;
$view = $this->getResource('view');
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
$view->headScript()->appendFile($baseUrl . '/js/libs/jquery-1.7.2.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
$view->headScript()->appendFile($baseUrl . '/js/libs/jquery-ui-1.8.18.custom.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
$view->headScript()->appendFile($baseUrl . '/js/libs/jquery.stickyPanel.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
$view->headScript()->appendFile($baseUrl . '/js/qtip/jquery.qtip.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
$view->headScript()->appendFile($baseUrl . '/js/jplayer/jquery.jplayer.min.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
$view->headScript()->appendFile($baseUrl . '/js/sprintf/sprintf-0.7-beta1.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
$view->headScript()->appendFile($baseUrl . '/js/bootstrap/bootstrap.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
$view->headScript()->appendScript("var baseUrl='{$baseUrl}/'");
//scripts for now playing bar
$view->headScript()->appendFile($baseUrl . '/js/airtime/airtime_bootstrap.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
$view->headScript()->appendFile($baseUrl . '/js/airtime/dashboard/helperfunctions.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
$view->headScript()->appendFile($baseUrl . '/js/airtime/dashboard/dashboard.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
$view->headScript()->appendFile($baseUrl . '/js/airtime/dashboard/versiontooltip.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
$view->headScript()->appendFile($baseUrl . '/js/airtime/common/common.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
$view->headScript()->appendFile($baseUrl . '/js/airtime/common/audioplaytest.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
$user = Application_Model_User::getCurrentUser();
if (!is_null($user)) {
$userType = $user->getType();
} else {
$userType = "";
}
$view->headScript()->appendScript("var userType = '{$userType}';");
if (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1) {
$view->headScript()->appendFile($baseUrl . '/js/libs/google-analytics.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
}
}
开发者ID:nidzix,项目名称:Airtime,代码行数:31,代码来源:Bootstrap.php
示例20: init
public function init()
{
$this->setName('frmProject');
$this->addElement('text', 'title', array('label' => 'Project Title:', 'autocomplete' => "off", 'class' => 'text-input medium-input', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'You must enter project title')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
$this->addElement('textarea', 'description', array('label' => 'Description:', 'class' => 'text-input textarea address', 'required' => false, 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
$this->addElement('textarea', 'clientInfo', array('label' => 'Client Info.:', 'class' => 'text-input textarea address', 'required' => false, 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
$this->addElement('text', 'startDate', array('label' => 'Start Date:', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please enter start date')))), 'class' => 'text-input small-input', 'readonly' => 'true', 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
$this->addElement('text', 'endDate', array('label' => 'End Date:', 'required' => false, 'class' => 'text-input small-input', 'readonly' => 'true', 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim')));
$this->addElement('select', 'status', array('label' => 'Status:', 'class' => 'text-input small-input', 'required' => true, 'decorators' => $this->elementDecorators, 'MultiOptions' => array('open' => "Open", 'close' => "Close"), 'value' => "open"));
$user = new Application_Model_User();
$arrUser = $user->getAllUsers('active');
$this->addElement('select', 'projectManagerId', array('label' => 'Project Manager:', 'class' => 'text-input small-input', 'required' => false, 'decorators' => $this->elementDecorators, 'MultiOptions' => $arrUser));
$this->addElement('select', 'teamLeaderId', array('label' => 'Team Leader:', 'class' => 'text-input small-input', 'required' => false, 'decorators' => $this->elementDecorators, 'MultiOptions' => $arrUser));
$this->addElement('select', 'resource', array('label' => 'Resource:', 'class' => 'text-input small-input', 'required' => false, 'decorators' => $this->elementDecorators, 'MultiOptions' => $arrUser));
$this->addElement('submit', 'submit', array('required' => false, 'class' => 'button', 'ignore' => true, 'label' => 'Submit', 'value' => 'submit', 'decorators' => $this->buttonDecorators));
}
开发者ID:riteshsahu1981,项目名称:Weadvance,代码行数:16,代码来源:Project.php
注:本文中的Application_Model_User类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论