x

Main chapters

  1. LimeSurvey Cloud vs LimeSurvey CE
  2. LimeSurvey Cloud - Quick start guide
  3. LimeSurvey CE - Installation
  4. How to design a good survey (Guide)
  5. Getting started
  6. LimeSurvey configuration
  7. Introduction - Surveys
  8. View survey settings
  9. View survey menu
  10. View survey structure
  11. Introduction - Questions
  12. Introduction - Question Groups
  13. Introduction - Surveys - Management
  14. Survey toolbar options
  15. Multilingual survey
  16. Quick start guide - ExpressionScript
  17. Advanced features
  18. General FAQ
  19. Troubleshooting
  20. Workarounds
  21. License
  22. Version change log
  23. Plugins - Advanced
 Actions

Yii

From LimeSurvey Manual

Yii

Table of contents:{toc}

This page is intended to help people get started on the Yii branch of the code and to provide some guidance in coding. At the moment I am just getting started with the branch myself and run into some stuff I think needs to be adressed. Please feel free to help improve this page and correct me if I'm wrong ;-)

First some useful links:

Userguide of the Yii framework v1.1

Some hints on code completion in NetBeans IDE

Controllers

Most important stuff to know is in [1] where the basics of controllers / actions are described.

For LimeSurvey we use our own controller class LSYii_Controller to extend instead of the CController class. This helps us by providing the necessary libraries and some convenience methods and it also helps to have a single point to inject future extensions.

Actions

In Yii controllers can encapsulate actions when we use a method with a special name that is prefixed with 'action'. So a method actionSubmit would be the submit action. Actions can also be separated from their controller for various reasons. In LimeSurvey we try to do this as much as possible, placing the action classes in a subdirectory below the controllers directory with the lowercased name of the controller they belong to.

Inline documentation

To help our fellow coders understand what a method is supposed to do, we try to document using docblocks as much as possible. Providing type hints on return values helps in most IDE for code completion. Sometimes working like this can feel like more typing for the coder who knows his way around the code but for other who are not familiar with the code it can be of great value. So please document as much as possible.