Wiki articles

Showing 1-20 of 146 items.

When to use Active Record

Created a year ago by samdark.

When to use Active Record is a common question among developers, Yii and overall.

9 0
3 followers
Viewed: 37 060 times
Version: all
Category: FAQs

Update and Delete buttons on Breadcrumb

Created a year ago by Daniel.

The definition of breadcrumbs according to its documentation is as follow: Breadcrumbs displays a list of links indicating the position of the current page in the whole site hierarchy.

0 0
1 follower
Viewed: 32 870 times
Version: 2.0
Category: Tips

Auto-update denormalized attributes with MongoDb and Yii2

Created 5 years ago by edoardo849, updated 5 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: 12 579 times
Version: 2.0
Category: Tips

MongoDb's embedded documents mapping for ActiveRecord in Yii2

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

suppose to have in Mongo a collection "user" like:

3 0
6 followers
Viewed: 19 844 times
Version: 2.0
Category: How-tos
10 0
15 followers
Viewed: 34 361 times
Version: all
Category: Others

Tunneling using SSH in a limited enviroment

Created 6 years ago by nineinchnick, updated 5 years ago by CeBe.

This tutorial describes how to connect to a remote service via tunnel when only most basic software is available on the remote server. It is not directly related to Yii. It could be hovewer useful for web developers working with shared hosting sites with limited access.

1 0
3 followers
Viewed: 11 310 times
Version: all
Category: Others

Integrating ZF2 into Yii - use case demonstrated

Created 6 years ago by Boaz, updated 5 years ago by Boaz.

I needed to use a class from ZF2 in my Yii project. I've read probably all there is about this subject and still I needed lots of trial & errors to get it working, probably due to my lack of experience working with namepsaces and ZF2 in general. Also, the resources on the web are all partial, at best. Most simply refer to ZF1 where things are technically different. When I got it all working I de...

4 0
6 followers
Viewed: 10 438 times
Version: 2.0
Category: How-tos

Creating a Simple CRUD App With Yii2 (Revised 12/20/2013)

Created 6 years ago by Charles R. Portwood II, updated 5 years ago by Vivek.

By popular demand, today I will be revisiting my previous Yii Framework 2 Getting Started Guide and updating it with what is currently available in the Yii Framework 2 Repository. Provide here is an super simple example CRUD application that will help you get started using the framework.

7 6
21 followers
Viewed: 228 103 times
Version: 2.0
Category: Tutorials

How to implement cron in Yii 2

Created 5 years ago by hemc, updated 5 years ago by hemc.

In advance template there is already a file yii. And there is no need to run it as php, it is Linux script.

3 0
13 followers
Viewed: 75 934 times
Version: 2.0
Category: How-tos
Tags: console, cron, yii2

Automatic Parameter Binding to POST vars in Yii2

Created 6 years ago by aarondfrancis, updated 5 years ago by YiiJeka.

I wrote about this on my blog, but wanted to post it here too.

0 0
4 followers
Viewed: 18 980 times
Version: 2.0
Category: How-tos

How to use BootstrapInterface

Created 5 years ago by Antonio Ramirez, updated 5 years ago by Antonio Ramirez.

Yii2 introduces the BootstrapInterface to ease our application initialization tasks, whether they are composer based or Application bootstrap (do not mistaken with Bootstrap CSS Framework) based tasks. On this article, I am going to explain how to use it on y...

2 0
3 followers
Viewed: 13 925 times
Version: 2.0
Category: How-tos

Displaying, Sorting and Filtering Model Relations on a GridView

Created 5 years ago by Antonio Ramirez, updated 5 years ago by Antonio Ramirez.

One of the things you will find tricky to implement is the the sorting and filtering of a GridView's column that displays related model data.

29 0
31 followers
Viewed: 255 675 times
Version: 2.0
Category: How-tos

Cómo enviar emails usando SMTP

Created 5 years ago by robregonm, updated 5 years ago by robregonm.
2 0
2 followers
Viewed: 17 570 times
Version: 2.0
Category: How-tos

Yii2 default values for Index data Provider

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

Guys,

2 0
5 followers
Viewed: 25 389 times
Version: 2.0
Category: Tips

What to do when composer fails to update your vendor packages?

Created 5 years ago by Kartik V, updated 5 years ago by Kartik V.
  • Running a composer update does not fetch any new packages (even though the source is updated)
  • A specific vendor package never gets updated
  • Facing on and off problems when fetching packages while performing composer update.
  • You ran a composer update earlier, but it was partially done, before you lost network connectivity, and you cannot refresh packages anymore.
0 3
36 followers
Viewed: 29 065 times
Version: 2.0
Category: Tutorials

Overcoming removal of client helpers (e.g. ajaxLink) and ClientScript in Yii 2.0

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

Alternatively, inline assets (JS/CSS) can be registered at runtime from within the View. For example you can clearly simulate the ajaxLink feature using a inline javascript. Its however recommended if you can merge where possible, client code (JS/CSS) into separate JS/CSS files and loaded through the AssetBundle. Note there is no more need of a CClientScript anymore:

0 2
40 followers
Viewed: 33 716 times
Version: 2.0
Category: FAQs

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(); `

4 2
40 followers
Viewed: 46 363 times
Version: all
Category: Tips

My Own Components Folder in Yii2

Created 5 years ago by CTala, updated 5 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: 15 069 times
Version: 2.0
Category: Tips

Locking your Yii 2 project package versions with composer.lock

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

Ok, you have installed a Yii 2 basic or advanced app for the first time and completed the post install steps. You have picked up a few extensions to install for the first time as well. You would already see a composer.lock file in your application root folder.

0 2
37 followers
Viewed: 10 239 times
Version: 2.0
Category: Tips

Install specific Yii2 vendor extension & dependency without updating other packages.

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

The tips here are for advanced usages of composer and its assumed you have read about using composer and have a knowledge of your vendor packages to be updated. Let's consider, you want to update only one specific yii2 vendor library, without updating all the other extension packages?

2 3
39 followers
Viewed: 29 519 times
Version: 2.0
Category: Tips