Wiki

Articles in category "how-tos", sorted by commentsX
Displaying 131-140 of 354 result(s).

Using International Dates

Created 6 years ago by Russell EnglandHow-tos4 comments – viewed 38,893 times – ( +18 / -1 ) – version 1.1
I needed British (dd/mm/yyyy) formatted dates throughout my application but found it very difficult to find examples of how to do this - until I found this excellent forum post http://www.yiiframework.com/forum/index.php?/topic/3649-dealing-with-i18n-date-formats/

Creating a Dependent Dropdown From Scratch in Yii2

Created 3 years ago by ThePr0f3550rHow-tos4 comments – viewed 72,001 times – ( +8 / -1 ) – version 2.0
I have read http://www.yiiframework.com/wiki/24/creating-a-dependent-dropdown/ (Dependen Dropdown Yii1), but I cant implementation in Yii2 because Yii2 not built-in AJAX functionality hem.. I am search about it and get this statement

Using updateAll and deleteAll with scopes

Created 3 years ago by le_topHow-tos4 comments – viewed 29,072 times – ( +5 / -1 ) – version 1.1
Using CActiveRecord->updateAll() and CActiveRecord->deleteAll() with scopes and criteria requires some tricks that are explained in this article. While findAll() , find() and some other methods use scopes automatically, updateAll() and deleteAll() do not.

Alternative folder structure for a standard Yii app

Created 4 years ago by TrejderHow-tos4 comments – viewed 14,950 times – ( +5 / -1 ) – version 1.1
I found a standard Yii app's protected folder structure nearly perfect. With a few simple moves and a little bit change to the code, I managed to bring it to the level, which I found as fully perfect. I want to share my point of view, in case someone would like to use this structure as well.

Client-side form validation using Twitter Bootstrap's Popovers

Created 4 years ago by TrejderHow-tos4 comments – viewed 37,135 times – ( +4 / -2 ) – version 1.1
This article explains how to easily turn standard text-line validation errors into beautifully and professionally looking Twitter Bootstrap's Popovers.

defaultScope

Created 4 years ago by Gerhard LiebenbergHow-tos4 comments – viewed 23,033 times – ( +5 / -2 ) – version 1.1
This example includes a composite condition as well as an empty condition - as if you bypass or disable defaultScope without using resetScope().

Write & use a custom Component in Yii2.0

Created 3 years ago by sirin kHow-tos4 comments – viewed 69,986 times – ( +18 / -1 ) – version 2.0
This is a simple example in Yii2.0 to understand how you can write a custom component and use it inside your app.(basic template)

How to implement form events

Created 3 years ago by Antonio RamirezHow-tos4 comments – viewed 18,550 times – ( +6 / -1 ) – version 2.0
You have that, when a product is on development they can change its API anytime. This change is quite important though, its related on how to set the events of your form, for example, the useful beforeSubmit.
tags: yii2, forms, how to

How to keep filters simple in CGridView

Created 2 years ago by PeppeHow-tos3 comments – viewed 6,451 times – ( +1 / -1 ) – version 1.1
The problem is not new: after setting some filters in a grid (typically in admin view), and gone to another page, returning in the grid's page I would like to find the filters with previous setting mantained.

How to re enable logging during unit testing

Created 5 years ago by AsgarothHow-tos3 comments – viewed 16,260 times – ( +11 / -1 ) – version 1.1
Some of you have experienced the need to log some information while doing unit testing, due to the fact that the information given in the summary is just not enough, to know why the test is actually failing. this article focuses on 2 ways to get you logs up and running again.