Wiki

Sorted by viewsX
Displaying 421-430 of 786 result(s).

Yii2 default values for Index data Provider

Created 3 years ago by CTalaTips3 comments – viewed 19,019 times – ( +4 / -1 ) – version 2.0
Guys,

[Updated] How to create & call custom global function in whole application?

Created 3 years ago by Rohit SutharTutorials8 comments – viewed 19,013 times – ( +5 / -3 ) – version 1.1
In this wiki I will show how to create own custom global function. It may be save the space and reduce the time.

Radio Button List with enum values for column of type ENUM >+> incorporate into giix

Created 5 years ago by pckabeerHow-tos1 comment – viewed 18,889 times – ( +7 / -1 ) – version 1.1
Let's say our table 'mug' has a column named 'color' of the type ENUM('red','green','blue'). We want to replace the textfield for the attribute color in the create and update forms of a 'mug' with a Radio Button List, which has the enum values as options. This is a rewrite of c@cba in the wiki article of enumDropdownListThe main code was contributed by zaccaria in the forum (see this post).

Use CGridview to sort and filter CSqlDataProvider - when used with UNRELATED tables (or complex queries)

Created 3 years ago by Gerhard LiebenbergHow-tos6 comments – viewed 18,816 times – ( -1 ) – version 1.1
I have two tables called hospitals and departments. I have a junction table between them which holds the departments in each hospital. But sometimes I need a list of "All hospitals with All possible departments" - regardless of whether they are linked in the junction table or not.

Install specific Yii2 vendor extension & dependency without updating other packages.

Created 3 years ago by Kartik VTips0 comments – viewed 18,798 times – ( +40 / -7 ) – version 2.0
The tips here are for advanced usages of composer and its assumed you have read about using composer and have a knowledge of your vendor packages to be updated. Let's consider, you want to update only one specific yii2 vendor library, without updating all the other extension packages?

Using Grunt for deploying client scripts

Created 4 years ago by Chris83How-tos8 comments – viewed 18,564 times – ( +11 / -1 ) – version 1.1
For a long time I have struggled to find a suitable tool for doing server tasks such as compiling LESS files, concatenating and minifying of JavaScript files and copying the minified JavaScript files. While most of these tasks can be done with Yii extensions I would still not recommend using them because it requires you to include these extensions in your project, and therefore also deploying them in your production environment.

Create a custom menu using CMenu data-items (flat or tree structure)

Created 4 years ago by Kostas Apazidis (KonApaz)How-tos0 comments – viewed 18,549 times – ( +4 / -1 ) – version 1.1
There are cases that you want more control to your menu Suppose you want a specific menu with complex css, layout, images. also you want to add extra content,html,css,javascript etc it run time foreach submenu item by conditions.

Code style

Created 7 years ago by zaccariaTips2 comments – viewed 18,416 times – ( +30 / -1 ) – version 1.1
Often, when writing widgets or editing Yii code, it is unclear whether or not the code is following the MVC pattern.
tags: mvc

Extending an ActiveRecord model

Created 4 years ago by BogseyHow-tos3 comments – viewed 18,403 times – ( +2 / -4 ) – version 1.1
Introduction

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

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