Wiki

Articles tagged with "config"X
Displaying 1-10 of 16 result(s).

Yii configuration: Dynamic & User dependent

Created 10 days ago by le_topHow-tos0 comments – viewed 1,155 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 hide /frontend/web in url addresses on apache

Created 25 days ago by raminiousHow-tos6 comments – viewed 25,122 times – ( +9 ) – 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)

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

Created 5 months ago by Kartik VTutorials0 comments – viewed 2,064 times – ( +29 / -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

Created 8 months ago by trondHow-tos2 comments – viewed 2,603 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

Created about a year ago by transistorTips1 comment – viewed 17,956 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.

Setting static modules' properties in config

Created 2 years ago by Alexander PalamarchukTips0 comments – viewed 5,463 times – ( +2 / -2 ) – version 1.1
You may face a situation when you need to access to a configurable module's property from everywhere and you don't have an instance of this module's class.
tags: config, module

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

Created 2 years ago by Alexander PalamarchukTips1 comment – viewed 5,044 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

YiiBackboneBoilerplate - Project Setup for your Yii+BackboneJS applications

Created 2 years ago by Antonio RamirezOthers5 comments – viewed 18,433 times – ( +14 ) – version 1.1
YiiBackboneBoilerplate
tags: directory, config

YiiBoilerplate - Setup a professional project structure in seconds

Created 2 years ago by Antonio RamirezOthers53 comments – viewed 46,380 times – ( +47 ) – version 1.1
YiiBoilerplate
tags: directory, config

Setting application parameters dynamically in the back-end

Created 2 years ago by PablovpTutorials6 comments – viewed 29,092 times – ( +11 / -1 ) – version 1.1
I was wondering how to set-up the application parameters in the back-end to use them all around the application without the need of using the database and I came up with this solution, I hope it helps somebody else.