Wiki articles

Showing 41-60 of 822 items.

Yii v2 snippet guide III

Created 3 years ago by rackycz, updated 8 months ago by rackycz.

Articles are separated into more files as there is the max lenght for each file on wiki.

8 0
4 followers
Viewed: 164 741 times
Version: 2.0
Category: Tutorials

Pjax on ActiveForm and GridView - Yii2

Created 9 years ago by Sreenadh, updated 9 years ago by Sreenadh.

Here is a example on how to use Pjax with GridView (yii\grid\GridView) and ActiveForm (yii\widgets\ActiveForm) widgets in Yii2.

6 0
15 followers
Viewed: 163 598 times
Version: 2.0
Category: How-tos

Relations: BELONGS_TO versus HAS_ONE

Created 12 years ago by Steve Friedl, updated 10 years ago by Jorgee.

It's very common to see new Yii users confusing the relations HAS_ONE and BELONGS_TO, and getting it wrong means you won't get proper values back. And though we'll talk about HAS_MANY as well, we're specifically omitting the MANY_MANY relation because it's a whole different animal.

56 0
35 followers
Viewed: 163 006 times
Version: 1.1
Category: FAQs

Behaviors & events

Created 14 years ago by pestaa, updated 11 years ago by Gismo.

These features provide endless possibilities and unbelievable flexibility, but as current documentation does not give more than a few examples, it might be difficult to fully understand their internals and requirements.

43 0
48 followers
Viewed: 160 305 times
Version: 1.1
Category: Tutorials
Tags:

Configuring PhpStorm IDE for Yii 1.1

Created 13 years ago by samdark, updated 6 years ago by samdark.
  • Complete code: Ctrl+Space.
  • Show method arguments: Ctrl+Q.
59 1
53 followers
Viewed: 152 630 times
Version: 1.1
Category: Tips
Tags: IDE, PhpStorm

Add information to Yii::app()->user by extending CWebUser

Created 14 years ago by atrandafir, updated 11 years ago by Yang He.

This little tutorial explains a way how you can retrieve more parameters from Yii::app()->user by adding a component that extends CWebUser and retrieves the user information from database table named User.

27 0
38 followers
Viewed: 151 247 times
Version: 1.1
Category: Tutorials
Tags:

JWT authentication tutorial

Created 2 years ago by Allan Jensen, updated 2 years ago by Allan Jensen.

JWT is short for JSON Web Token. It is used eg. instead of sessions to maintain a login in a browser that is talking to an API - since browser sessions are vulnerable to CSRF security issues. JWT is also less complicated than setting up an OAuth authentication mechanism.

13 0
8 followers
Viewed: 149 843 times
Version: 2.0
Category: Tutorials

Building a REST API in Yii2.0

Created 9 years ago by sirin k, updated 6 years ago by Maurizio Domba Cerin.

This is wiki page is useful if you are trying to build a customized REST API in Yii2.0

4 0
16 followers
Viewed: 149 044 times
Version: 2.0
Category: Tutorials

Creating a Dependent Dropdown From Scratch in Yii2

Created 9 years ago by ThePr0f3550r, updated 6 years ago by alrazi.

I have read http://www.yiiframework.com/wiki/24/creating-a-dependent-dropdown/ (Dependen Dropdown Yii1), but I can't implement it in Yii2 because Yii2 does not have built-in AJAX functionality hem.. I searched about it and came across this post

4 1
12 followers
Viewed: 147 248 times
Version: 2.0
Category: How-tos

Accessing data in a join table with the related models

Created 12 years ago by fsb, updated 11 years ago by krowe.

Sometimes the right place to store application data is in a join table. For example, movie viewers either like or don’t like the movies they watched.

16 1
30 followers
Viewed: 146 489 times
Version: 1.1
Category: How-tos

Setting and getting systemwide static parameters

Created 13 years ago by Steve Friedl, updated 13 years ago by Steve Friedl.

Occasionally one wishes to set systemwide parameters for an application, such as a contact address for email, an application name, or setting an option that guides major behavior. Yii provides for setting of static parameters in the configuration file, and this article talks about how to do it conveniently.

11 0
12 followers
Viewed: 146 196 times
Version: 1.1
Category: How-tos
Tags: config

Multiple-database support in Yii

Created 13 years ago by Steve Friedl, updated 11 years ago by phazei.

The customary configuration of a Yii application includes just a single database section in the protected/config/main.php file, but it's easy to extend this to support more than one, tying each Model to one of the databases.

20 0
39 followers
Viewed: 144 267 times
Version: 1.1
Category: How-tos
Tags: database

How to customize the error message of a validation rule

Created 15 years ago by qiang, updated 11 years ago by Yang He.

Validators extending from [CValidator] all have a property named [message|CValidator::message]. You can set this property in the corresponding validation rule to customize the error message. For example, the following validation rule uses an error message that is different from the default one:

13 0
14 followers
Viewed: 144 202 times
Version: 1.1
Category: Tutorials
Tags:

yii2-app-advanced on single domain (Apache, Nginx)

Created 9 years ago by MadAnd, updated 2 years ago by QuPsi.

If you develop rather complex applications with Yii2, you might already be familiar with yii2-app-advanced application template. Well, the template is awesome and provides high flexibility regarding code/configuration sharing among parts of an application.

4 0
14 followers
Viewed: 143 899 times
Version: 2.0
Category: How-tos

Creating a parameterized LIKE query

Created 12 years ago by Steve Friedl, updated 12 years ago by Asgaroth.

It's common to see users wishing to make substring DB queries, using the % metacharacter used to match anything; in this FAQ we'll search the tbl_comments table from the blog tutorial hoping to find the text in $match in the content column

13 0
21 followers
Viewed: 143 487 times
Version: 1.1
Category: FAQs

CGridView, CListView and CActiveDataProvider

Created 11 years ago by softark, updated 10 years ago by softark.

CGridView (or CListView) together with CActiveDataProvider is a very powerful combination of the built-in tools of Yii. But how do they work together to accomplish their fantastic functions? And what are you expected to do to use them and to customize their behaviors? This article explains the very basics of them.

26 0
33 followers
Viewed: 143 442 times
Version: 1.1
Category: Tutorials

Date Picker by examples

Created 10 years ago by Interboy, updated 8 years ago by Alfa Adhitya.

CJuiDatePicker displays a datepicker. CJuiDatePicker encapsulates the JUI datepicker plugin.

6 0
7 followers
Viewed: 139 486 times
Version: 1.1
Category: How-tos

How to use PHPExcel external library with Yii

Created 13 years ago by Antonio Ramirez, updated 10 years ago by cgsmith.

Trying to learn and help some other programmers to find their solutions on the Yii Forum (I think is a superb way to learn the framework), I was facing one challenge with an external library that a fellow programmer wanted to use -quite good indeed: PHPExcel. And what is PHPExcel?

27 1
25 followers
Viewed: 138 654 times
Version: 1.1
Category: How-tos

How to set up Unicode

Created 15 years ago by Mike, updated 10 years ago by Roman Solomatin.

To fix issues with display of special language characters once and for all there's a solution: use Unicode UTF-8 everywhere. If everything is set up to use Unicode, you can use mostly every language in your application.

19 0
14 followers
Viewed: 135 772 times
Version: 1.1
Category: How-tos
Tags: i18n, unicode

Organize directories for applications with front-end and back-end using WebApplicationEnd behavior

Created 14 years ago by andy_s, updated 11 years ago by kiran sharma.

Previously there was described a way to build an application with front-end and back-end. I would like to continue this theme and suggest another way to organize directories using WebApplicationEnd behavior.

26 0
44 followers
Viewed: 135 489 times
Version: 1.1
Category: Tutorials
Tags: