yii-json-dataprovider A data provider that extends CActiveDataProvider in order to retrieve an (configurable) json result

  1. Update on 06/11/2013
  2. Requirements
  3. Usage
  4. Resources

A yii dataprovider that extends CActiveDataProvider in order to retrieve json. Attributes and relations that are fetched are recursively configurable. Furthermore key names can be replaced by aliases to compress the json size.

Feel free to contribute at GitHub.

Update on 06/11/2013

  1. Extracting the work horse that does the converting to new class ModelToArrayConverter. This class is usable stand-alone, too.
  2. New method getArrayCountData on JSonActiveDataProvider to retrieve just the count information, but no data.
  3. New callback onAfterModelToArray on JSonActiveDataProvider for optional custom extracting of data per model.
  4. For convenience relations can be defined now directly with an attributes description (instead of wrapping them into another array with a key "attributes")
  5. Examples at github readme updated

All changes do not break old behavior or usage!

Requirements

Developed with Yii 1.10, but should work in older versions, too.

Usage

See Readme on GitHub

Resources

5 1
8 followers
0 downloads
Yii Version: Unknown
License: BSD-2-Clause
Category: Others
Developed by: Sebastian K.
Created on: May 31, 2013
Last updated: 11 years ago

Related Extensions