示例#1
0
 /**
  * The default action
  *
  * Displays the admin dashboard
  *
  * @return void
  */
 public function indexAction()
 {
     $notes = new Model_Note();
     $this->view->notes = $notes->getUsersNotes();
     $content = new Model_Page();
     $this->view->pages = $content->getCurrentUsersPages('create_date DESC', 5);
     $user = new Model_User();
     $identity = $user->getCurrentUser();
     $form = new Admin_Form_User();
     $form->onlyIndexIndexActionElements();
     $form->setAction($this->baseUrl . '/admin/user/update-my-account');
     $firstName = $form->getElement('first_name');
     $firstName->setValue($identity->first_name);
     $lastName = $form->getElement('last_name');
     $lastName->setValue($identity->last_name);
     $email = $form->getElement('email');
     $email->setValue($identity->email);
     $submit = $form->getElement('submitAdminUserForm');
     $submit->setLabel($this->view->getTranslation('Update My Account'));
     $displayGroup = $form->getDisplayGroup('adminUserGroup');
     $displayGroup->setLegend($this->view->getTranslation('My Account'))->setAttrib('class', 'formColumn');
     $this->view->form = $form;
 }