Wiki

Sorted by viewsX
Displaying 681-690 of 784 result(s).

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

Created 4 years ago by Alexander PalamarchukTips1 comment – viewed 7,722 times – ( +2 / -2 ) – 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

YII2 Pagination Options

Created 2 years ago by VivekYiiTips0 comments – viewed 7,670 times – ( +1 / -1 ) – version 2.0
solution here If we are using default pagination option like
tags: pagination, View, vivs

ePay Integration - Bulgarian Payment Provider

Created 4 years ago by yasenTutorials2 comments – viewed 7,614 times – ( +8 / -1 ) – version 1.1
I. In the view script add the following hidden fields:

Attaching multiple event handlers to onBeginRequest

Created 3 years ago by BoazHow-tos0 comments – viewed 7,609 times – ( +2 / -1 ) – version 1.1
There came the need to perform two operations, always, on 'application boot' time. Example? My real world example involved some geo-location logic (that's the first operation) and syncing of some session details so KcFinder can be in sync with the user in context - each user with his own session container (the second).

Create thermometer using rgraph

Created 4 years ago by Ankit ModiTips2 comments – viewed 7,590 times – ( +4 / -1 )
Hi friends,

Multilanguage Lorem Ipsum Text Generator

Created 4 years ago by yasenHow-tos2 comments – viewed 7,527 times – ( +2 / -1 ) – version 1.1
Taking futher the idea from Piotr Masełkowski - http://www.yiiframework.com/extension/elipsum/ here's how to generate multilanguage Lorem Ipsum text. This example uses English and Bulgarian sample paragraphs. Create a class in /protected/components/LoremIpsum.php. Wall of text incoming wohoo...

REST API and null values in XML

Created 9 months ago by marko60Tips0 comments – viewed 7,524 times – ( -1 ) – version 2.0
I have been working on a REST API using the excellent tools provided by Yii2. My problem was that I have to differentiate between empty values and null values. In other words, <elem></elem> is different from null as it represents an empty string. Also, although some use <elem/> to represent a null value it should still be interpreted as an empty string. In other cases, the absence of the element is taken to represent a null value, but this may create problem with some parsers.
tags: REST, XML, null

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

Created 3 years ago by Kartik VTutorials0 comments – viewed 7,513 times – ( +39 / -5 ) – 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:

Multiple CGridView virtual attributes, retrieved from a single model function. Also communication between CGridView columns and rows; and between CGridView and its own parent view.

Created 2 years ago by Gerhard LiebenbergHow-tos3 comments – viewed 7,479 times – ( +1 / -1 ) – version 1.1
We probably have all used a virtual attribute (model function) to retrieve complex or related data for a CGridView column:

Advanced CGridview issues - custom button using php and html

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos0 comments – viewed 7,438 times – ( +1 / -1 ) – version 1.1
This wiki shows about how to make a custom column or how to pass php-Yii-html code in CButtonColumn (as a button)