/** * URL: Example/viewModelFormBinding/ * Alias: view-model-annotated-binding-example/ * * @annotation DependenciesLocations(People) * @annotation DependencyInjection(PersonService, PersonViewModel) * * @return View */ public function viewModelFormBindingAction() { $this->createExampleDisplayTemplate("Annotated ViewModel Binding Example", "_viewModelAnnotatedBinding"); $this->view->content = "Hello World from the <b>ExampleController viewModelFormBindingAction</b> action"; $this->view->addJavascript("public/js/example.js"); return $this->viewModel("People/Person", PeopleService::get()); }
/** * URL: Example/viewModelBindingAction/ * Alias: view-model-binding-example/ * * @annotation DependenciesLocations(People) * @annotation DependencyInjection(PersonService, PersonViewModel) * * @return View */ public function viewModelBindingAction() { $this->createExampleDisplayTemplate("ViewModel Binding Example", "_viewModelBinding"); $this->view->content = "Hello World from the <b>ExampleController viewModelBindingAction</b> action"; return $this->viewModel(PeopleService::get()); }