Wiki

Sorted by commentsX
Displaying 511-520 of 719 result(s).

Search method of a model for filters when using dates - unixtimestamp in database

Created 3 years ago by MukkeTips1 comment – viewed 23,388 times – ( +10 ) – version 1.1
I ran into a problem and on irc we worked it out. Since there is a lack on information on filters in genral i thought i'd start sharing all my findings, might be usefull for other people.

htmlOptions explained for various controls.

Created 3 years ago by WoilTips1 comment – viewed 43,903 times – ( +17 ) – version 1.1
Most controls that are rendered by CHtml have an argument called $htmlOptions. This argument is an array that holds the attributes of the HTML element. For example the following code:

How to use GridView with AJAX

Created 8 months ago by Antonio RamirezHow-tos1 comment – viewed 9,323 times – ( +9 ) – version 2.0
With the adoption of PJax on Yii2 things  have change quite a bit with GridView when it comes to work with them in AJAX mode. It will probably be confusing at the beginning, but then you will soon realize how powerful the new approach is.
tags: yii2, pjax, widget

Functional tests independing from your urlManager settings

Created 3 years ago by RusAlexTips1 comment – viewed 7,632 times – version 1.1
If you are testing your app and use urlManager in your config, sometimes you will find a problem: you want to test your site independing from urlManager settings. in that way you need to extend your WebTestCase class by this method:

Open bootstrap modal and load content via Ajax

Created 7 months ago by JbalTeroHow-tos1 comment – viewed 17,607 times – ( +3 ) – version 1.1
My goal here is to Open bootstrap modal and load ANY content using ajax response.

Making friends' configs, DB credentials and paths with version control

Created 2 years ago by Alexander PalamarchukTips1 comment – viewed 5,223 times – ( +2 / -1 ) – version 1.1
In many cases developers of one project use their own local environments for coding. There may be a common test platform and, of course, production. All these environments usually have different DB credentials and directory structures (first of all, path to YII framework directory). Another feature is debugging. It's convenient to turn it on for local environments, eventually - on the test server and never (generally speaking) - on the production.
tags: config

How to read HTML5 Multiple File Input from controller?

Created 7 months ago by Kartik VHow-tos1 comment – viewed 2,467 times – ( +27 / -4 ) – version all
Ok, so you have a HTML 5 file input markup on your view and you have enabled multiple attribute to true. You may also be using widgets based on HTML5 input like \kartik\widgets\FileInput. But when you read a file in Yii controller using CUploadedFile (Yii1) or UploadedFile (Yii2), you do not see a list of multiple files that you selected in your view, but only one row. Your HTML markup in your view would be something like this and you don't know why this is not working?

yii vim eclimd how it works

Created 3 years ago by RusAlexHow-tos1 comment – viewed 7,701 times – ( +10 ) – version 1.1
I want to create a wiki page, and therefore im opening this discussion on this forum, for answering all questions and see other opinions, how do you use vim with yii.
tags: vim, eclimd, vimrc

Yii2 default values for Index data Provider

Created 7 months ago by CTalaTips1 comment – viewed 2,466 times – ( +2 ) – version 2.0
Guys,

Overcoming removal of client helpers (e.g. ajaxLink) and ClientScript in Yii 2.0

Created 7 months ago by Kartik VFAQs1 comment – viewed 4,425 times – ( +30 / -4 ) – version 2.0
With Yii Framework 2.0, one of the many changes, that Yii 1.x developers will face is removal of all client helpers and revamp of the CClientScript functionality. For example no more CHtml::ajaxLink or Html::ajaxLink. How do you cater to such requirements in Yii 2.0?