Excuse me, Zend How does the view send the message to the controller action

Source: Internet
Author: User
Ask, Zend How does the view send the message to the controller action?
Heroes, I want to modify a Zend program, there are several places do not understand, very anxious, hope enlighten:

In index.html, there are the following statements:
Preurl >/view/memberlist "target=" Contentframe "> View user List


Clicking on the hyperlink above will perform a memberlistaction function in application/modules/admin/controller/viewcontroller.php, as follows:

Class Admin_viewcontroller extends Kslf_controller_action_admin
{
Public Function memberlistaction () {
$request = $this->getrequest ();
$this->view->headtitle (' View user list ');
$auth = Zend_auth::getinstance ();
$options =array ();

Some operation codes are omitted.

$this->view->memberlist= $list->itemlist;
$this->view->status_translation_arr= $status _translation_arr;
$this->view->allowedit= ($auth->getidentity ()->user_type== ' Administrator ')? True:false;
}


Then, you go to the template/scripts/view/memberlist.html page.


I know this is the MVC framework mechanism, how can I define my own action controller, such as Memberlist2action (), to achieve the effect of my motion controller?
------Solution--------------------
Add a method in Admin_viewcontroller: Public function Memberlist2action () {}

Change page link to: Preurl? >/view/memberlist2 "

Clicking on this link will execute your method: Memberlist2action
------Solution--------------------
Get/post

It's the web, that's for sure.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.