Wiki articles

Showing 101-120 of 142 items.

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

Created 5 years ago by Kartik V, updated 4 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.

10 3
47 followers
Viewed: 135 801 times
Version: 2.0
Category: Tips

FORM with GET method causes repeated stacking of URL Parameters

Created 5 years ago by Kartik V, updated 5 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(); `

5 2
40 followers
Viewed: 44 383 times
Version: all
Category: Tips

Displaying uploaded file from DB for update with FileInput widget

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

This is for folks who are using \kartik\widgets\FileInput to upload files from your client. How do you display an image for update after you have uploaded it to the server using the widget?

1 3
42 followers
Viewed: 46 794 times
Version: 2.0
Category: How-tos

How to use imagine ( crop, thumb, effects for images ) on Yii2

Created 4 years ago by Anas AbuDayah, updated 3 years ago by Cozumel.

Imagine adds most common image functions and also acts as a wrapper to Imagine image manipulation library.

5 0
13 followers
Viewed: 74 178 times
Version: 2.0
Category: Tutorials

Drills : Search by a HAS_MANY relation in Yii 2.0

Created 4 years ago by softark, updated 10 months ago by softark.

This article tries to describe the practical techniques of searching by a HAS_MANY relation using ActiveRecord of Yii 2.0.

11 0
12 followers
Viewed: 75 163 times
Version: 2.0
Category: Tutorials

How to install Yii 2 advanced on a shared hosting environment

Created 3 years ago by oligalma, updated a month ago by oligalma.

I've read many comments that it's not possible to install Yii 2 advanced on a shared hosting environment, as it has two webroots. This is partially true.

3 0
2 followers
Viewed: 23 599 times
Version: 2.0
Category: How-tos

Simple Jui Autocomplete in yii2

Created 3 years ago by ajith, updated 3 years ago by ajith.

To use jui auto complete widget first add

0 0
3 followers
Viewed: 32 589 times
Version: 2.0
Category: Tutorials

How to create/update a model with its related items using Listbox or CheckboxList

Created 3 years ago by softark, updated a year ago by softark.

Assume we have many categories and many posts.

3 0
6 followers
Viewed: 29 552 times
Version: 2.0
Category: Tutorials

How to make bootstrap tabs remain active/selected after navigating to different web pages.

Created 2 years ago by emrald, updated 2 years ago by emrald.

Bootstrap tabs gets unselected/inactive when user navigates to other page and comes back. How to make bootstrap tabs remain active/selected after navigating to different web pages.

1 0
3 followers
Viewed: 9 449 times
Version: 2.0
Category: Tutorials

Using your own forked version of extensions with composer

Created 5 years ago by Kartik V, updated 4 years ago by Kartik V.

So you want to use a fork of any existing vendor extension with your Yii 2 install and use the fork, instead of original source. This does not need you to push any update or register your package on packagist.org. You are recommended to follow the approach below:

3 2
40 followers
Viewed: 16 284 times
Version: 2.0
Category: Tutorials

Managing a star rating with the StarRating widget in Yii 2

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

In Yii 1.x, there was a built in widget CStarRating based on the jquery star rating plugin. There exists no prebuilt solution in Yii2, however the same concepts can be extended using any jquery plugin.

1 3
41 followers
Viewed: 16 408 times
Version: 2.0
Category: How-tos

An alternative way to ElasticSearch

Created a year ago by Necip, updated a year ago by Necip.

This article is for those who have dealt with the complexity of Elasticsearch or any other indexing machines and are looking for an easier way to index the existing database without additional effort.

1 0
2 followers
Viewed: 7 312 times
Version: all
Category: How-tos

Creating a Dependent Dropdown From Scratch in Yii2

Created 5 years ago by ThePr0f3550r, updated a year ago by alrazi.

I have read http://www.yiiframework.com/wiki/24/creating-a-dependent-dropdown/ (Dependen Dropdown Yii1), but I can't implement it in Yii2 because Yii2 does not have built-in AJAX functionality hem.. I searched about it and came across this post

3 1
11 followers
Viewed: 103 819 times
Version: 2.0
Category: How-tos

Write & use a custom Component in Yii2.0

Created 4 years ago by sirin k, updated 2 years ago by Maurizio Domba Cerin.

This is a simple example in Yii2.0 to understand how you can write a custom component and use it inside your app.(basic template)

12 0
11 followers
Viewed: 97 459 times
Version: 2.0
Category: How-tos

How to implement form events

Created 4 years ago by Antonio Ramirez, updated 3 years ago by deacs.

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.

5 0
6 followers
Viewed: 26 325 times
Version: 2.0
Category: How-tos
Tags: Forms, How to, yii2

Using multiple models in an identity

Created 10 months ago by samdark, updated 6 months ago by samdark.

Let's assume we have two models: Customer and Supplier and we want both to log in. Yii is quite flexible when it comes to authentication and authorization so it's possible.

8 2
2 followers
Viewed: 16 338 times
Version: 2.0
Category: How-tos

Create Form With DynamicModel

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

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

2 0
7 followers
Viewed: 31 442 times
Version: 2.0
Category: Tips
Tags: form, model, yii2

Step by step for how to full export Yii2 grid to excel

Created 4 years ago by Scott_Huang, updated 4 years ago by Scott_Huang.

We will leverage Yii2-excelview widget. So, first of all is install Yii2-excelview:

0 0
5 followers
Viewed: 54 763 times
Version: 2.0
Category: Tips

Simple way to implement Dynamic Tabular Inputs

Created 4 years ago by ezekielnoob, updated 6 months ago by samdark.

grid

2 0
10 followers
Viewed: 29 863 times
Version: 2.0
Category: Tutorials

Load data from internal/external source to fill form fields

Created 4 years ago by skworden, updated 4 years ago by skworden.

This wiki is to show you how to use jQuery get and JSON to get data from a dropdown/any form field and fill form fields with the values instantaneously. First, I'll give example use cases of what I'm going to teach you so you can quickly see if this is for you.

1 0
5 followers
Viewed: 22 373 times
Version: 2.0
Category: How-tos