Location: PHPKode > projects > Anahita Social Engine > dependencies/plg_system_socialengine/socialengine/uikit/people/json.php
<?php

class AnUikitPeopleJson extends KViewAbstract
{
	/**
	 * 
	 * @param $people Array Object
	 */
	public function setPeople($people, $action = '')
	{	
		$this->assign('people', $people);
		return $this;
	}
	
    public function display()
    {			
		$people = array();		
		foreach($this->people as $person) {
			$array = array();
			$array['id']     = $person->id;
			$array['name']   = $person->name;
			$array['avatar'] = array();
			$array['profileURL'] = $person->profileURL;
			$array['status']	 = $person->status;
			$array['statusUpdatedTime'] = array('string'=>(string) $person->statusUpdatedTime,'timestamp'=>$person->statusUpdatedTime->getDate(DATE_FORMAT_UNIXTIME));
			foreach(AnModelAvatar::getSizes() as $size => $dim ) {
				$array['avatar'][$size] = $person->avatar->getURL($size);
			}
			$people[$person->id] = $array;
		}
		
		print json_encode($people);	
    }
}
Return current item: Anahita Social Engine