Wiki

Sorted by viewsX
Displaying 441-450 of 786 result(s).

TDD with PHPUnit_Story and Yii

Created 6 years ago by sidewinderTutorials1 comment – viewed 18,407 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.

Using jQuery UI 1.8.10 themes with Yii 1.1.6

Created 6 years ago by a110yTips7 comments – viewed 18,388 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:

Add model validator in Controller

Created 3 years ago by Kostas Apazidis (KonApaz)Tips4 comments – viewed 18,362 times – ( +1 / -2 ) – version 1.1
There are cases that model validators should be depended by controller/action and you couldn't manipulate on the model class or using scenarios in easy way

Managing constants easily

Created 6 years ago by briiC.lvTips4 comments – viewed 18,304 times – ( +4 / -1 ) – version 1.1
For time to time i have models with constants (basicly status constants) which i use in diferent places and if these constant changes, i have to change mentions of constant in code elsewhere.

Yii2 and Pdf files with Mpdf

Created 3 years ago by CTalaHow-tos2 comments – viewed 18,253 times – ( +7 / -1 ) – version 2.0
I am still new to composer and packagist, so I want to share how I am creating the pdf files because for me was not as simple as it should be.

Impersonate Users within Yii Framework

Created 6 years ago by WoilTutorials6 comments – viewed 18,231 times – ( +22 / -1 ) – version 1.1
For some applications it can be advantageous for administration reasons to allow site administrators to login as other users. This is sometimes called user impersonation or "becoming that user".

Login Form With email or Whatever

Created 3 years ago by nabil abdoualiHow-tos1 comment – viewed 18,193 times – ( -3 ) – version 1.1
Here is my solution to login with email or anything else This update works with database mysql You must generate the user model with GII

How to pass the third parameter to UserIdentity on login authentication

Created 3 years ago by Rohit SutharHow-tos6 comments – viewed 18,141 times – ( +2 / -1 ) – version 1.1
In this wiki I will show how could wo pass the third parameter to UserIdentity on login authenticate. So we can do separate login authentcation from two or more different models from single login form.

Insert a multirow header in CGridView

Created 4 years ago by PeppeHow-tos2 comments – viewed 18,117 times – ( +6 / -1 ) – version 1.1
The CGridView widget is very useful and customizable, but sometimes you need a little more. One limit I found is to have only one row for headers; yes, you can write each column header in more than one row, but just inside the single cell. I was looking instead for the possibility to use more than one row, with different structure one from the others. This way you can write columns grouping headers, and obtain a nicer view.

get summary of related model via STAT relation

Created 4 years ago by rootbearHow-tos2 comments – viewed 18,081 times – ( +7 / -2 ) – version 1.1
typical scenario: invoice, invoice items.