Summary

In this chapter, we discussed about the user interface and how Yii helps us with its core functionalities. The first important tool that Yii provides is Gii, which facilitates CRUD actions and views' creation, which we used in Gii to manage rooms, reservations, and customers, for example.

Next we saw how to embed JavaScript and CSS in a layout and views, with file content or an inline block. This was applied to an example that showed you how to change the number of columns displayed based on the browser's available width; this is typically a task for websites or web apps that display advertising columns.

Again on the subject of JavaScript, you learned how to implement direct AJAX calls, taking an example where the reservation detail was dynamically loaded from the customers drop-down list.

Next we looked at Yii's core user interface library, which is built on Bootstrap and we illustrated how to use the main Bootstrap widgets natively, together with DatePicker (probably the most commonly used jQuery UI widget).

Finally, the last topics covered were multiple models of the same and different classes. We looked at two examples on these topics: the first one to save multiple customers at the same time and the second to create a customer and reservation in the same view.

In the next chapter, we will explain how to set up login authentication and authorization, and will reach these goals from scratch.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.244.250