Book Image

Mastering Yii

By : Charles R. Portwood ll
Book Image

Mastering Yii

By: Charles R. Portwood ll

Overview of this book

The successor of Yii Framework 1.1, Yii 2 is a complete rewrite of Yii Framework, one of the most popular PHP 5 frameworks around for making modern web applications. The update embraces the best practices and protocols established with newer versions of PHP, while still maintaining the simple, fast, and extendable behavior found in its predecessor. This book has been written to enhance your skills and knowledge with Yii Framework 2. Starting with configuration and how to initialize new projects, you’ll learn how to configure, manage, and use every aspect of Yii2 from Gii, DAO, Query Builder, Active Record, and migrations, to asset manager. You'll also discover how to automatically test your code using codeception. With this book by your side, you’ll have all the skills you need to quickly create rich modern web and console applications with Yii 2.
Table of Contents (20 chapters)
Mastering Yii
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
5
Modules, Widgets, and Helpers
13
Debugging and Deploying
Index

Summary


We covered a lot of information in this chapter! We covered how to properly set up and configure Gii, the code generation tool for Yii2. We then covered how we can automatically create Active Record classes based upon our database schema using both the web and console interface for Gii in addition to many of the common methods and properties we can bind to our Active Record classes, such as validation rules, attribute labels, and behaviors. Next, we covered how to create basic models that do not depend upon our database and how to add scenarios to our models and Active Record classes. We finally covered how we can use the Gii tool to create HTML forms based upon our models and explored some of the functionality that comes with the ActiveForm class.

In the next chapter, we are going to expand our knowledge of the available helpers and widgets that come with Yii2. We will also dive into modules in Yii2 and explore how we can use them to create reusable self-contained applications that...