Wiki

Articles in category "how-tos", sorted by date (updated)X
Displaying 11-20 of 350 result(s).

Escape from Default's Yii2 Delete Confirm Box

Updated 4 months ago by CozumelHow-tos8 comments – viewed 17,402 times – ( +9 / -1 ) – version 2.0
If you started playing with Yii2's new GridView, you will soon realize that some things have improved quite a lot, but I am sure its going to be a bit confusing at first glance when you try to modify certain javascript behaviors like for example, its delete confirmation dialog box.

Handling recursive deletion in Yii

Updated 4 months ago by JamesBarnsleyHow-tos3 comments – viewed 9,076 times – ( +3 ) – version 1.1
I www.jamesbarnsley.com was tasked to find a way to do recursive deletion in Yii. As I asked other developers and looked around the internet the usual answers all came up, use a plugin or use cascade delete at the DB level, but I did not want to do either of these.

Handling Bootstrap active tabs in Yii via URL

Updated 4 months ago by JamesBarnsleyHow-tos17 comments – viewed 24,523 times – ( +7 ) – version 1.1
I (www.jamesbarnsley.com) found that when using the Yii Bootstrap tabs component you will sometimes want to direct the user to a specific tab and not necessarily the first tab. Yii Bootstrap already provides the "active" variable so you can define whether the tab is the active tab or not in PHP. I generally find though that a PHP solution to this problem is rather cumbersome as every tab component will need the PHP code inserted or you will have to extend the tab component somehow to do it.

How to implement form events

Updated 6 months ago by deacsHow-tos4 comments – viewed 11,530 times – ( +6 ) – 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

MySQL migration environment

Updated 7 months ago by Fabrizio CaldarelliHow-tos0 comments – viewed 4,358 times – version 2.0
It can happen that you work in development environment and you make changes to database tables structures, adding tables, or changing fields.

How to use a Widget as an Action Provider

Updated 7 months ago by stinkytofuHow-tos14 comments – viewed 39,720 times – ( +27 ) – version 1.1
As written on the API docs: An Action Provider Widget is a widget that has declared several actions by using its 'public static function actions()'. After, a Controller can easily import all its declared actions on its 'public function actions()'.
tags: Widgets, CAction

Cron Jobs in Yii

Updated 7 months ago by Roman SolomatinHow-tos1 comment – viewed 19,939 times – ( +4 ) – version 1.1
I've gotten Yii running cron jobs, and wanted to explain briefly how I did it.

How to use nested DB transactions (MySQL 5+, PostgreSQL)

Updated 8 months ago by BoazHow-tos6 comments – viewed 39,093 times – ( +46 ) – version 1.1
Original source code and idea are from: PHP, PDO & Nested Transactions.

Simple Google Maps object for use with ajax maps

Updated 8 months ago by Chris BackhouseHow-tos1 comment – viewed 4,550 times – ( +1 ) – version 2.0
The Google mapping extension by Dos Amigos (link) is really great but there are difficulties with Google maps when you want to manipulate your map object with Ajax.
tags: googlemap, maps

Execute migration on server/linux using shell

Updated 8 months ago by dariooHow-tos2 comments – viewed 3,918 times – version 2.0
It's easy to execute migration locally on XAMPP using cmd, but on server where you script is it's little bit harder.