Wiki

Sorted by ratingX
Displaying 381-390 of 733 result(s).

How to use Expression in default AccessControl to allow only the owner to do some action

Created about a year ago by whatifHow-tos1 comment – viewed 20,564 times – ( +7 / -1 ) – version 1.1
Hi Everyone

get summary of related model via STAT relation

Created about a year ago by rootbearHow-tos2 comments – viewed 9,872 times – ( +7 / -1 ) – version 1.1
typical scenario: invoice, invoice items.

i18n All-in-one format and timezone conversions for date, time, timestamp and datetime.

Created about a year ago by Gerhard LiebenbergHow-tos3 comments – viewed 13,466 times – ( +7 / -1 ) – version 1.1
Countries sometimes change their laws pertaining to timezones and daylight saving times. This means that GMT+2 can be a different time this August compared to last August! However, by using php's DateTime class (instead of timestamps), we can do both "format" and "timezone" conversions on a single DateTime object (only 2 lines of code) for date, time, timestamp and datetime types - while php takes care of nightmares such as current and historical timezones and daylight saving times.

using multiple radio button

Created 2 years ago by francis jaTips4 comments – viewed 33,536 times – ( +7 / -1 ) – version 1.1
When we use multiple radio buttons with same name in Yii many people have the problem on getting the value of the selected radiobutton. The radioButtonList can be used for that, but if we need to use radioButton itself to place the button any where in a view, we need to include one more parameter in htmloption array().

How to "masquerade" a non-required form element as 'required' one (in the view only)

Created 2 years ago by BoazHow-tos2 comments – viewed 9,577 times – ( +7 / -1 ) – version 1.1
In a nutshell, the task at hand is to mark (or render) a model attribute in the typical "_form.php" view file with the 'required' red asterisk while this attribute is not marked as required in the model's rule() method. If you're interested only in the solution, jump ahead to the 'solution' section below.

Yii registry, how to use it, does it exist at all?

Created 3 years ago by dckurushinHow-tos2 comments – viewed 19,422 times – ( +7 / -1 ) – version 1.1
From time to time people ask about registry...

Installing Yii Users and Rights to Newly Created Yii app

Created 2 years ago by Rajith RTutorials25 comments – viewed 65,088 times – ( +23 / -10 ) – version 1.1
After creating an yii app . we need to implement permission, Authentication and Authorization .so the best way is to use the Yii users and Rights modules.

Saving files to a blob field in the database

Created 4 years ago by zaccariaTips8 comments – viewed 44,392 times – ( +9 / -2 ) – version 1.1
As a follow-up from the How to upload a file using a model wiki entry that explains how to save a file to the filesystem, this article will do the same using a blob field in the database.
tags: File upload

Windows Web Development With AMPPS, NetBeans and XDebug

Created 3 years ago by macinvilleTutorials1 comment – viewed 20,655 times – ( +4 ) – version 1.1
This article will discuss how to setup your web development environment with the following specifications:

Pjax on ActiveForm and GridView - Yii2

Created 3 months ago by SreenadhHow-tos3 comments – viewed 9,287 times – ( +4 ) – version 2.0
Here is a example on how to use Pjax with GridView (yii\grid\GridView) and ActiveForm (yii\widgets\ActiveForm) widgets in Yii2.