<?php

	defined('FULL_PATH') or die('restricted access!');

	/**
	 * Extends/overrides methods of default ReviewsEventHandler class
	 *
	 */

	class EReviewEventHandler extends ReviewsEventHandler {
		/**
		 * Makes left join to item's table, when in separate grid
		 *
		 * @param kEvent $event
		 */
		function OnAfterConfigRead(&$event)
		{
			parent::OnAfterConfigRead($event);

			// 1. add fields
//			$fields = $this->Application->getUnitOption($event->Prefix, 'Fields');
//			$this->Application->setUnitOption($event->Prefix, 'Fields', $fields);
					
			// 2. calculated fields
//			$calculated_fields = $this->Application->getUnitOption($event->Prefix, 'CalculatedFields');			
//			$this->Application->setUnitOption($event->Prefix, 'CalculatedFields', $calculated_fields);
		}

				
		/**
		 * Before new item created
		 *
		 * @param kEvent $event
		 */
		function OnBeforeItemCreate(&$event)
		{
			parent::OnBeforeItemCreate($event);


		}

		/**
		 * Before existing item updated
		 *
		 * @param kEvent $event
		 */
		function OnBeforeItemUpdate(&$event)
		{
			parent::OnBeforeItemUpdate($event);


		}

		/**
		 * Before item deleted
		 *
		 * @param kEvent $event
		 */
		function OnBeforeItemDelete(&$event)
		{
			parent::OnBeforeItemDelete($event);


		}

		/**
		 * After item loaded
		 *
		 * @param kEvent $event
		 */
		function OnBeforeItemLoad(&$event)
		{
			parent::OnBeforeItemLoad($event);


		}


		/**
		 * After new item created
		 *
		 * @param kEvent $event
		 */
		function OnAfterItemCreate(&$event)
		{
			parent::OnAfterItemCreate($event);


		}

		/**
		 * After existing item updated
		 *
		 * @param kEvent $event
		 */
		function OnAfterItemUpdate(&$event)
		{
			parent::OnAfterItemUpdate($event);


		}

		/**
		 * After item deleted
		 *
		 * @param kEvent $event
		 */
		function OnAfterItemDelete(&$event)
		{
			parent::OnAfterItemDelete($event);


		}

		/**
		 * After item loaded
		 *
		 * @param kEvent $event
		 */
		function OnAfterItemLoad(&$event)
		{
			parent::OnAfterItemLoad($event);


		}
		
	}
