Wiki

Sorted by viewsX
Displaying 411-420 of 784 result(s).

Simple way to implement Dynamic Tabular Inputs

Created 2 years ago by ezekielnoobTutorials5 comments – viewed 18,108 times – ( +4 / -1 ) – version all

How to implement an event and attach it in a behavior

Created 4 years ago by seb7How-tos0 comments – viewed 18,060 times – ( +6 / -1 ) – version 1.1
This page explains how to implement an event and catch that event in a behavior.
tags: event, behavior

Using Grunt for deploying client scripts

Created 4 years ago by Chris83How-tos8 comments – viewed 17,863 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.

Code style

Created 6 years ago by zaccariaTips2 comments – viewed 17,815 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

Using jQuery UI 1.8.10 themes with Yii 1.1.6

Created 6 years ago by a110yTips7 comments – viewed 17,804 times – ( +2 / -1 ) – version 1.1
When using the latest stable jQuery UI themes (1.8.10) with Yii 1.1.6 (which uses 1.8.6) the widgets don't appear (they're invisible but they're there). In order to make them visible you need to change the following line:

BUM - Add Additional Info to a User

Created 3 years ago by fireflyHow-tos1 comment – viewed 17,787 times – ( +1 / -1 ) – version 1.1
How to add additional information to a user when using BUM extension?

TDD with PHPUnit_Story and Yii

Created 5 years ago by sidewinderTutorials1 comment – viewed 17,769 times – ( +7 / -1 ) – version 1.1
Unfortunately Sebastian Bergmann decided to remove PHPUnit_Story from future PHPUnit versions. Thanks to elvan for pointing me to the relevant comment. As an alternative Behat has been suggested but it seems too bloated for me TBH. There is also PHPSpec but it's non flexible enough for me and tightly bound with English language (What's the purpose of using DSL if customers can't speak English). Since both frameworks are quite young I think I'll just stick to PHPUnit and see what's going on on the BDD frameworks arena. Even PHPUnit_Story parts of this entry are going to be deprecated soon, rest is still valid! When doing TDD, please write tests with design and behaviour of application in mind instead of testing single functions.

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

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos0 comments – viewed 17,695 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.

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

Created 2 years ago by Gerhard LiebenbergHow-tos6 comments – viewed 17,676 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.

How to implement form events

Created 2 years ago by Antonio RamirezHow-tos4 comments – viewed 17,662 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