Articles in category "how-tos", sorted by ratingX
Displaying 161-170 of 346 result(s).

Changing Controllers Name

Created 4 years ago by TrejderHow-tos0 comments – viewed 14,255 times – ( +5 ) – version 1.1
This very short how-to presents steps required to change controller name. It is oriented for less experienced users, which are starting their journey with Yii, to avoid common newbie pitfalls.

MongoDb's embedded documents mapping for ActiveRecord in Yii2

Created about a year ago by edoardo849How-tos2 comments – viewed 7,570 times – ( +5 ) – version 2.0
You are working with MongoDb and you have embedded documents in your collection that you want to easily map in your Model for CRUD operations.

How to use EzComponents in Yii

Created 4 years ago by EhsanjsHow-tos0 comments – viewed 8,168 times – ( +5 ) – version 1.1
change your index.php

Creating a Dependent Dropdown From Scratch in Yii2

Created about a year ago by ThePr0f3550rHow-tos1 comment – viewed 28,022 times – ( +5 ) – version 2.0
I have read (Dependen Dropdown Yii1), but I cant implementation in Yii2 because Yii2 not built-in AJAX functionality hem.. I am search about it and get this statement

Using updateAll and deleteAll with scopes

Created about a year ago by le_topHow-tos4 comments – viewed 15,598 times – ( +5 ) – version 1.1
Using CActiveRecord->updateAll() and CActiveRecord->deleteAll() with scopes and criteria requires some tricks that are explained in this article. While findAll() , find() and some other methods use scopes automatically, updateAll() and deleteAll() do not.

Alternative folder structure for a standard Yii app

Created 2 years ago by TrejderHow-tos4 comments – viewed 11,138 times – ( +5 ) – 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.

How to provide a fallback or mapping for translation messages?

Created 2 years ago by schmunkHow-tos1 comment – viewed 4,535 times – ( +5 ) – version 1.1
Sometimes you want to use exisiting translations for locales, which do not directly match. An example would be a website targeting Germany (de_de), Austria (de_at) and Switzerland (de_ch, fr_ch, it_ch). Although you may have exisiting translations for German (de), French (fr) and Italian (it), there are problems using it directly.

Popup AJAX DialogBox without any extension

Created 2 years ago by Kostas Apazidis (KonApaz)How-tos6 comments – viewed 16,325 times – ( +8 / -1 )
In this wiki I explain how to show a default popup dialogbox (like Gii does) using an existing module.

How to use Expression in default AccessControl to allow only the owner to do some action

Created 2 years ago by whatifHow-tos2 comments – viewed 26,129 times – ( +8 / -1 ) – version 1.1
Hi Everyone

Yet another implementation of CPhpAuthManager.

Created 2 years ago by seenivasanHow-tos3 comments – viewed 9,958 times – ( +8 / -1 ) – version 1.1
In this wiki, I try to implement a simple authorization schema without putting much logic inside a file or into database table. We are constructing authorization hierarchy inside the controller. We are getting roles for the current user from database table and assigning only roles to user that are declared in the particular controller. We have brought down the work of loading of auth data at main application level to controller level. This way we have pulverised auth data for entire site into smaller units. Finally we are going to look at couple of examples.