Articles tagged with "config", sorted by date (updated)X
Displaying 1-10 of 18 result(s).

YII2: Create console commands inside a module or extension

Updated about a month ago by OldMehdiTutorials1 comment – viewed 5,786 times – ( +3 ) – version 2.0
Here is a small guide how to get console commands running inside modules & extensions. For this guide I used a fresh yii2 basic application template.
tags: yii2, tutorial, config

How to hide /frontend/web in url addresses on apache

Updated 10 months ago by yiimHow-tos13 comments – viewed 48,091 times – ( +14 ) – version 2.0
There is an issue on Yii2 to redirecting / urls to /frontend/web. In other words we need a way to hidden /frontend/web from addresses. We will do this without changing Apache configuration and creating virtual host or setting document root (It's good for share hostings that we have not access to apache.conf)

Moving the vendor directory for multiple projects

Updated 12 months ago by mariosimaremareHow-tos2 comments – viewed 6,602 times – ( +4 / -1 ) – version 2.0
This How-To is useful if you are planning to move the Yii vendor directory outside the default location.

Yii configuration: Dynamic & User dependent

Updated about a year ago by le_topHow-tos0 comments – viewed 3,454 times – ( +1 ) – version 1.1
It is difficult to perform user dependent theming through a general configuration in 'main.php'. This article proposes a method to do so through a Factory that dynamically generates classes to allow delayed resolution of actual user values. This means that you can refer to values that are stored in the database through the CActiveRecord before Yii is actually loaded. The values will be fetched from the database when actually used for the first time, which is after Yii is loaded. Actually, you can use pretty much any method that relies on Yii with this method.

How to store array/widget configuration to the database with config validation rules

Updated about a year ago by Kartik VTutorials0 comments – viewed 4,395 times – ( +38 / -4 ) – version 2.0
You may have scenarios, where you want to store a specific array configuration to the database. A classic example could be saving Yii widget configuration to the database and then retrieving it at runtime, with dynamic parameters set. This wiki discusses one of the approaches to do this. Let's consider you have something like the NavBar configuration below to store in the db:

Configuring Yii to run on both Windows and OSX

Updated about a year ago by CeBeHow-tos2 comments – viewed 3,968 times – ( +2 ) – version 1.1
If you develop your Yii project on both Windows and Mac, there can be a problem setting up the configuration unless the configurations for both system are identical. On my machines I have the following configurations:
tags: config

How to use a component before every action of a controller

Updated 2 years ago by transistorTips1 comment – viewed 25,750 times – ( +2 / -1 ) – version 1.1
I guess this is a tip on how to execute some code before every action in a controller, because I will tell you how I did it and maybe you can use the idea in your project.

The directory structure of the Yii project site

Updated 2 years ago by Yang HeOthers41 comments – viewed 143,177 times – ( +85 ) – version 1.1
In this article, we describe the directory structure used by - the official Yii framework website. While this structure may look overly complicated for small projects or may not be optimal in some sense, we believe it is appropriate for medium or large projects in a team development environment. In fact, we have successfully used the similar structure in some other big projects.
tags: directory, config

Making friends' configs, DB credentials and paths with version control

Updated 2 years ago by ajsharmaTips1 comment – viewed 6,207 times – ( +2 / -1 ) – version 1.1
In many cases developers of one project use their own local environments for coding. There may be a common test platform and, of course, production. All these environments usually have different DB credentials and directory structures (first of all, path to YII framework directory). Another feature is debugging. It's convenient to turn it on for local environments, eventually - on the test server and never (generally speaking) - on the production.
tags: config

YiiBoilerplate - Setup a professional project structure in seconds

Updated 3 years ago by Antonio RamirezOthers53 comments – viewed 53,427 times – ( +48 ) – version 1.1
tags: directory, config