Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Yii Project Blueprints
  • Table Of Contents Toc
Yii Project Blueprints

Yii Project Blueprints

By : Charles R. Portwood ll
3.5 (2)
close
close
Yii Project Blueprints

Yii Project Blueprints

3.5 (2)
By: Charles R. Portwood ll

Overview of this book

This book is for intermediate-to-advanced level Yii developers who want to master the Yii framework and develop real-world applications. You should have experience of working with Yii, PHP 5, HTML, CSS, and JavaScript.
Table of Contents (10 chapters)
close
close
9
Index

Exploring the skeleton project


There are actually a lot of different things going on in the background to make this work even if this is just a 404 error. Before we start doing any development, let's take a look at a few of the classes that have been provided in our skeleton project in the protected/components folder.

Extending models from a common class

The first class that has been provided to us is an ActiveRecord extension called CMSActiveRecord that all of our models will stem from. This class allows us to reduce the amount of code that we have to write in each class. For now, we'll simply add CTimestampBehavior and the afterFind() method we've used in previous chapters to store the old attributes for the time the need arises to compare the changed attributes with the new attributes:

class CMSActiveRecordCMSActiveRecord extends CActiveRecord
{
   public $_oldAttributes = array();

   public function behaviors()
   {
      return array(
         'CTimestampBehavior' => array(
      ...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Yii Project Blueprints
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon