1<?PHP2 //Background Public Module3 //_list Data Display4 //yourphp background-based operation notation5 //One, display data and search data6 7 /**8 * [_list display data list]9 * @param string $modelname [model name]Ten * @param array $map [conditions] One * @param string $sortBy [Sort by] A * @param boolean $ASC [default to reverse] - * @param integer $listRows [number of bars per page] - * @return [Type] [description] the */ - //function _list ($modelname, $map = ", $sortBy =", $asc = false, $listRows =) - classDemoactionextendsadminbaseaction{ - Public functionindex () { + $map[' abc '] = ' demo '; - $map[' cde '] = ' 123 '; + $this->_list (Module_name,$map);//This can be used directly when the controller name is the same as the database table name A //When the Controller name and database table name are inconsistent at $this->_list (' Demodb '); - //when conditions are complex, we need to combine $map to - $this-display (); - } - - //Some pages do not need to take a search, then you can omit the index () method in -}
Organize the background of the public module in the specific meaning of each method!
Youphp Learning and Finishing