Location: PHPKode > projects > Anahita Social Engine > dependencies/plg_system_socialengine/socialengine/model/person/edge/edge.php
<?php
/**
 * @version		1.0.0
 * @category	Anahita Social Engine™
 * @copyright	Copyright (C) 2008 - 2010 rmdStudio Inc. and Peerglobe Technology Inc. All rights reserved.
 * @license		GNU GPLv2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
 * @link     	http://www.anahitapolis.com
 */

class AnModelPersonEdge extends AnModelEdgeSocial
{	
	protected $_acl;
	
	public static function describe($model)
	{
		parent::describe($model);
		$model->rawQuery()->where('edge.component','=','com_socialengine');
		$model->getProperty('nodeA')->setModel('lib.anahita.model.person');
		$model->getProperty('nodeB')->setModel('lib.anahita.model.person');
	}
		
	public function getACL()
	{
		return KFactory::get('lib.anahita.model.acl')->chain(AnModelPersonEdgeRule::ACL);	
	}
	
	public function awakeFromInsert()
	{		
		parent::awakeFromInsert();
		//set default values for a person edge
		$this->_set('application', KFactory::get('lib.anahita.domain.factory.repository')->get('lib.anahita.model.application')->getApplicationByComponent('com_socialengine'));
		$this->_set('author', 	   AnModelAnahita::getSessionViewer());	
	}
	
	/*
	public function validateForInsert(KCommandContext $context)
	{

	}*/
	
}
Return current item: Anahita Social Engine