public function getEdit($id) { $result = array('city' => $this->city->getCity($id)); $result['title'] = 'Edit city'; $result['action'] = '/admin/city/' . $result['city']->id . '/edit'; $result['submit'] = 'Edit'; View::make('city.add', $result); if (Auth::isAuth()) { View::appendTemplateToLayout('topBar', 'top_bar/user'); } else { View::appendTemplateToLayout('topBar', 'top_bar/guest'); } View::appendTemplateToLayout('header', 'includes/header')->appendTemplateToLayout('footer', 'includes/footer')->render(); }