Wiki

Sorted by viewsX
Displaying 461-470 of 771 result(s).

How to create a simple logout link in the view?

Created 2 years ago by mi.sarahHow-tos0 comments – viewed 13,061 times – ( +1 / -3 ) – version 1.1
Here you learn to create and set a simple ahref-link to logout the current user.
tags: Logout, Link, user, URL, views

i18n for your model in just 1 line

Created 6 years ago by mintaoTutorials0 comments – viewed 13,019 times – ( +12 ) – version 1.1
A simple trick to get the localized version of a model field is to add this little method to your models.
tags: i18n

Update CGridview row separately using ajax request

Created 2 years ago by Kostas Apazidis (KonApaz)How-tos9 comments – viewed 12,968 times – ( +7 ) – version 1.1
There are cases you want to update a record on CGridview directly

AutoTimestampBehavior

Created 7 years ago by jonahTutorials1 comment – viewed 12,925 times – ( +2 / -2 ) – version 1.1
Note: currently a variant of this class CTimestampBehavior is included into Yii distribution package.

Managing different Bootstrap form layouts with yii2-field-range extension.

Created 2 years ago by Kartik VHow-tos0 comments – viewed 12,912 times – ( +36 ) – version 2.0
This wiki will explain how you can use the Field range extension with multiple Bootstrap form layouts (vertical or horizontal). You maybe aware, that 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.

Integrating FirePHP

Created 5 years ago by ricardogranaTutorials5 comments – viewed 12,859 times – ( +8 ) – version 1.1
Install Firebug plugin for Firefox from here.

Adding 'disabled' to CCheckBoxColumn and support for yiigridview.js

Created 3 years ago by Xgamer99Tips3 comments – viewed 12,833 times – ( +1 ) – version 1.1
I recently had to have a checkbox column in my grid view that supported the 'disabled' attribute. This was easy enough to do by extending the CCheckBoxColumn. However, I also wanted the checkbox to be selected when clicking on the table's row (supported via CGridView's selectableRows option). I discovered I had to tweak yiigridview.js so that it would not select disabled rows when clicking on it or on the 'select all' checkbox.

What to do when composer fails to update your vendor packages?

Created 2 years ago by Kartik VTutorials0 comments – viewed 12,811 times – ( +38 / -5 ) – version 2.0
Have you faced some of these problems when using composer with your Yii 2 installation?

三步使用cronjobs自动化去执行Yii 控制台任务

Created 4 years ago by Darwin WenTutorials0 comments – viewed 12,767 times – ( +1 / -4 ) – version 1.1
这篇文章将介绍使用Linux cronjobs去自动化执行Yii Console Application(控制台)任务,像每天晚上执行缓存清理,临时文件清理,发送邮件,网站备份等等,重复的工作都交给服务器后台去完成,Yii本身已经提供了强大的支持,我们所做的工作就很少,当使用yiic webapp 自动生成工程结构时,强大的Yii已经全部帮我们生成好,仅仅只需三步。

Alternative folder structure for a standard Yii app

Created 3 years ago by TrejderHow-tos4 comments – viewed 12,720 times – ( +5 ) – 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.