Wiki articles in category Tips

Showing 1-20 of 36 items.

Adding Yii Search to Your Browser Search Box

Created 14 years ago by qiang, updated 7 years ago by CeBe.

The official Yii project site now supports OpenSearch. This means you can customize your browser's search box to enable direct search of the content in yiiframework.com. For example, by entering a Yii class name in the browser's search box, the corresponding class API page will be shown in the browser.

25 0
6 followers
Viewed: 66 718 times
Version: all
Category: Tips

Configuring PhpStorm IDE for Yii 2

Created 7 years ago by CeBe, updated 7 years ago by CeBe.

There are a few settings and plugins that can enhance the development experience with Yii in PHPStorm or IntelliJ IDEA. This article explains how to get the most out of your IDE.

14 0
6 followers
Viewed: 55 054 times
Version: 2.0
Category: Tips

Boost composer-asset-plugin update speed

Created 9 years ago by schmunk, updated 8 years ago by samdark.

If you're using a lot of bower and npm assets with Yii 2.0 you might encounter long running composer update tasks.

6 0
6 followers
Viewed: 30 232 times
Version: 2.0
Category: Tips

Yii2 Report Grid

Created 7 years ago by Chris Backhouse, updated 7 years ago by Chris Backhouse.

There are some very advanced grids in the Yii2 community, specifically Kartik's amazing gridview extensions but they all designed for interactive screen use.

6 0
7 followers
Viewed: 35 826 times
Version: 2.0
Category: Tips

Yii 2 list of path aliases available with default basic and advanced app.

Created 11 years ago by Kartik V, updated 10 years ago by Kartik V.

If you are coming over from Yii 1.x to Yii 2, and already read this guide, you may note that namespaces are very important in Yii 2 to identify classes. But do you know the list of seeded path aliases that come shipped with a basic or advanced app? Here is my attempt to list them.

15 4
46 followers
Viewed: 185 972 times
Version: 2.0
Category: Tips

Create Form With DynamicModel

Created 10 years ago by Misbahul D Munir, updated 10 years ago by Misbahul D Munir.

In yii2 we can create form without create FormModel. Here we go

4 0
8 followers
Viewed: 49 845 times
Version: 2.0
Category: Tips
Tags: form, model, yii2

FORM with GET method causes repeated stacking of URL Parameters

Created 11 years ago by Kartik V, updated 11 years ago by toph.

// In Yii 1.x $form = $this->beginWidget('CActiveForm', [

'id' => 'order-search-form',
'method' => 'get',

]); echo $form->textInput($searchModel, 'id'); echo CHtml::submitButton('Find', ['class' => 'btn btn-primary']); $this->endWidget(); `

7 2
41 followers
Viewed: 64 127 times
Version: all
Category: Tips

How to change GridView delete confirmation message for specific controllers only?

Created 9 years ago by AlaFalaki, updated 9 years ago by AlaFalaki.

Hello,
If you want to give extra attention for some specific delete actions and you don't want to override whole yii.confirm JS method here is what you can do:
(I've only put the ActionColumn part of the GridView here to just give you the idea)

3 0
4 followers
Viewed: 47 719 times
Version: 2.0
Category: Tips

Key web server settings after installing a fresh Yii 2 basic or advanced app

Created 11 years ago by Kartik V, updated 11 years ago by Kartik V.

So, you have installed a brand new Yii 2 app (basic) or (advanced). Here are a few tips for Apache web server users to get things running more secure and better with your yii2 app.

3 0
46 followers
Viewed: 31 506 times
Version: 2.0
Category: Tips

Debuging variables in Yii2

Created 10 years ago by johonunu, updated 10 years ago by johonunu.

This tutorial is explained following "basic" application structure.

4 1
8 followers
Viewed: 44 792 times
Version: 2.0
Category: Tips

Interview Questions For YII2

Created 3 years ago by aayushmhu, updated 3 months ago by aayushmhu.

Hey Everyone, In this post I Just shared my Experience what most of interviewer ask in YII2 Interview.

2 0
2 followers
Viewed: 71 872 times
Version: 2.0
Category: Tips
Tags: interview

GridView show sum of columns in footer.

Created 2 years ago by shiv.

GridView show sum of columns in footer `PHP use yii\grid\DataColumn;

2 0
1 follower
Viewed: 98 584 times
Version: 2.0
Category: Tips

Yii2 default values for Index data Provider

Created 11 years ago by CTala, updated 11 years ago by CTala.

Guys,

2 0
5 followers
Viewed: 32 774 times
Version: 2.0
Category: Tips

embedded javascript block in your view with IDE checking or intellisense

Created 10 years ago by yiqing95, updated 10 years ago by yiqing95.

this is my way for embed js code block in view file:

2 0
3 followers
Viewed: 14 309 times
Version: 2.0
Category: Tips

Using Nginx and Apache2 in separate distributed servers (ie, Amazon EC2 instances)

Created 12 years ago by Luis Lobo Borobia, updated 8 years ago by Luis Lobo Borobia.

We are running one frontend running NGINX and several app servers running Apache2. There are several issues we have come across but right now I'll be documenting one of them. I'll be completing this article when I get more time.

2 0
2 followers
Viewed: 15 759 times
Version: all
Category: Tips

Aadhar Number Validator

Created 2 years ago by shiv.

In India have Aadhar number an we may need to valid it a input. So I created a validator for yii2

2 1
1 follower
Viewed: 94 858 times
Version: 2.0
Category: Tips
Tags: validator

My Own Components Folder in Yii2

Created 11 years ago by CTala, updated 11 years ago by CTala.

In Yii1 I used to have my own components under the components folder of the structure, now with namespacing this is a little bit different.

2 1
2 followers
Viewed: 22 097 times
Version: 2.0
Category: Tips

YII2 Pagination Options

Created 10 years ago by VivekYii, updated 10 years ago by VivekYii.

solution here If we are using default pagination option like

1 0
1 follower
Viewed: 19 534 times
Version: 2.0
Category: Tips

Load & Save With Relation

Created 10 years ago by moo.tensai, updated 10 years ago by moo.tensai.

Use this extension : yii2-relation-trait

1 0
2 followers
Viewed: 19 205 times
Version: 2.0
Category: Tips

Auto-update denormalized attributes with MongoDb and Yii2

Created 11 years ago by edoardo849, updated 11 years ago by CeBe.

You have different collections in MongoDb with de-normalized attributes. As you may know, due to its not-join nature, MongoDb tends to encourage repetition of the same value in different collections (de-normalization). In this MongoDb is opposed to a more SQL-like approach where you usually reference only the ID of the value with a foreign key.

1 0
3 followers
Viewed: 19 445 times
Version: 2.0
Category: Tips