Wiki

Articles in category "how-tos", sorted by viewsX
Displaying 211-220 of 355 result(s).

Using Google Maps in Yii Applications via Jquery

Created 4 years ago by bluyellHow-tos2 comments – viewed 16,060 times – ( +3 / -2 ) – version 1.1

How to "masquerade" a non-required form element as 'required' one (in the view only)

Created 5 years ago by BoazHow-tos2 comments – viewed 15,966 times – ( +7 / -2 ) – version 1.1
In a nutshell, the task at hand is to mark (or render) a model attribute in the typical "_form.php" view file with the 'required' red asterisk while this attribute is not marked as required in the model's rule() method. If you're interested only in the solution, jump ahead to the 'solution' section below.

Book Has Author - Many to Many relations using Kartik\Select2

Created 3 years ago by thiagoc7How-tos2 comments – viewed 15,956 times – ( +4 / -1 ) – version 2.0
I could make this work following same useful tips from this post.

Yii 1.1: How To add id or class to CMenu items ?

Created 3 years ago by Louis GacHow-tos0 comments – viewed 15,759 times – ( +2 / -1 ) – version 1.1
CMenu comes with a lot of great customization options built in. One of the most used is the class 'active' being added to menu item. But, what if you want to add your own class or id to a menu item ?

Using SQLite and CDbMessageSource as a module

Created 5 years ago by pheadeauxHow-tos5 comments – viewed 15,513 times – ( +5 / -1 ) – version 1.1
There are scenarios when you work with DVCS (like Mercurial or Git) and CDbMessageSource. To my experience keeping the development database and production database in sync can be very time consuming. Plus, when working in a team, you never know when the database was updated.

How to use bizRules in standard accessControl filter

Created 4 years ago by Maciej LiżewskiHow-tos8 comments – viewed 15,442 times – ( +3 / -1 ) – version 1.1
I assume you are familiar with accessControl standard filter. It allows you to separate privileges to run some action from action code itself. There is however one problem with most common usage - you cannot use bizRules, at least based on some parameters passed to 'checkAccess' just because it is hard to pass them in accessRules() result.

Update related models of a model using listBox and checkBoxList in the form

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos0 comments – viewed 15,384 times – ( +2 / -1 ) – version 1.1
Suppose you want to have a list in Category with its related products and you want to updates the list (removing or insert product items) This wiki show us how to do that

How to create yii2 extension and push to github and register into packagist to allow end user install from composer

Created 2 years ago by Scott_HuangHow-tos1 comment – viewed 15,361 times – ( +5 / -1 ) – version 2.0
1. Create Extension in yii2.

How to use yii2-authclient to communicate with Twitter using Single Access Token

Created 3 years ago by Antonio RamirezHow-tos2 comments – viewed 15,358 times – ( +4 / -1 ) – version 2.0
This tutorial is not about allowing users to sign into your application by using any of the OAuth providers available with the official yii2-authclient extension, it is about how to interact with your Twitter account, the one you set for your Yii2 app to promote your site, using the Single Access Token technique.

Alternative folder structure for a standard Yii app

Created 4 years ago by TrejderHow-tos4 comments – viewed 15,268 times – ( +5 / -1 ) – version 1.1
I found a standard Yii app's protected folder structure nearly perfect. With a few simple moves and a little bit change to the code, I managed to bring it to the level, which I found as fully perfect. I want to share my point of view, in case someone would like to use this structure as well.