Bu bina menü için bir işleyicisi
new MenuItem('Owner', lang('Owner'), assemble_url('Owner'), get_image_url('navigation/Company.gif')), new MenuItem('Client', lang('Client'), assemble_url('Client'), get_image_url('navigation/people.gif')),
Ben rota hazırladım hangi bir sistem modülü sınıfı
$router->map('Owner', 'Owner','null', array('controller' => 'companies', 'action' => 'index_owner'));
$router->map('Client', 'Client','null', array('controller' => 'companies', 'action' => 'index_client'));
yöntemler hte adı index_client, index_owner ile tanımlandığı controller sınıfı çağırır ... hem yöntem aynı kodu vardır.
function index_client(){
if(Company::canAdd($this->logged_user)) {
$this->wireframe->addPageAction(lang('New Company'), assemble_url('people_companies_add_client'));
} // if
if($this->request->isApiCall()) {
$this->serveData(Companies::findByIds($this->logged_user->visibleCompanyIds()), 'companies');
} else {
$page = (integer) $this->request->get('page');
if($page < 1) {
$page = 1;
} // if
list($companies, $pagination) = Companies::paginateActive($this->logged_user, $page, 30);
$this->smarty->assign(array(
'companies' => $companies,
'pagination' => $pagination,
));
} // if
} // index */
Which inturn calls smarty template named index_owner,index_client. I want that only one template should be called that is "index" because same things are being displayed only one flag in template is checked "is_owner" and according to that display of company is done..please tell me how flow goes like handlers,controller,module,view ??????