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.