Wiki

Sorted by ratingX
Displaying 31-40 of 786 result(s).

Displaying, Sorting and Filtering Model Relations on a GridView

Created 3 years ago by Antonio RamirezHow-tos15 comments – viewed 160,591 times – ( +46 / -1 ) – version 2.0
One of the things you will find tricky to implement is the the sorting and filtering of a GridView's column that displays related model data.

How to generate Yii-like Documentation

Created 6 years ago by AsgarothHow-tos9 comments – viewed 34,698 times – ( +46 / -1 ) – version 1.1
Something a good application cant miss is documentation, and what would be better than some nice formatted HTML documentation that can be auto-generated from your code, we know several tools that already do this like phpDocumentor, but today we are introducing Yii Docs Generator which is a modification of the code that Yii itself uses to generate its documentation, thank phpnode for this wonderful work.
tags: doc

Extending common classes to allow better customization

Created 6 years ago by Steve FriedlTips0 comments – viewed 30,586 times – ( +44 / -1 ) – version 1.1
The two most commonly-used base classes in most Yii applications are CController and CActiveRecord, each extended to your own particular models and controllers.

Javascript and AJAX with Yii

Created 5 years ago by François GannazHow-tos3 comments – viewed 142,853 times – ( +42 / -1 ) – version 1.1
This page intends to provide an exhaustive guide of how to use Javascript (JS) in Yii. It does not explain how to learn coding in JS, but how to deal with it "the Yii way".
tags: javascript, AJAX

Nested inline active fields inside Bootstrap horizontal forms

Created 3 years ago by Kartik VHow-tos2 comments – viewed 39,775 times – ( +42 / -1 ) – version 2.0
Are you using the Bootstrap 3 form styles with Yii 2 Active Forms? Have you faced problems in displaying complex layouts which needs you to display multiple inline form fields in a single row, within bootstrap horizontal forms. Then read on.

Create your own Validation Rule

Created 6 years ago by nickcvHow-tos14 comments – viewed 204,700 times – ( +76 / -4 ) – version 1.1
Some times the core validation rules provided by Yii won't satisfy all your needs, so you'll need to create your very own validation rule.

Save and Display Date/Time Fields in different formats in Yii2

Created 3 years ago by Kartik VHow-tos12 comments – viewed 117,645 times – ( +41 / -1 ) – version 2.0
You would find having such a need in most Yii Projects. Your database needs a specific format to store date fields, while you may want to display it in different formats to the users on forms and other views.

Single table inheritance

Created 6 years ago by samdarkHow-tos8 comments – viewed 38,350 times – ( +41 / -1 ) – version 1.1
Relational databases do not support inheritance so if we need to represent it, we have to somehow store meta info while keeping performance by minimizing JOINs. One way to solve this problem is using single table inheritance. All fields for the whole class tree are stored in a single table. Class name is stored in the type field of the same table.

Relational data fields display and edit with the yii2-detail-view extension

Created 3 years ago by Kartik VTutorials2 comments – viewed 43,456 times – ( +40 / -1 ) – version 2.0
If you have read this wiki you would be aware of the yii2-detail-view extension and how it offers you an easy way to EDIT and VIEW your model data, toggle these modes, and other features. You can read the extension documentation and/or view a demo of this extension, to understand usage.

Model validation for field ranges using yii2-field-range extension

Created 3 years ago by Kartik VTips0 comments – viewed 14,757 times – ( +39 / -1 ) – version 2.0
The yii2-field-range extension enables you to easily setup ActiveField range fields with Bootstrap styling. You basically can setup two attributes joined together like a single field with combined validation error block.