classes/Events/API/Event.php
public function getCalendars($params = array(), $public = false) {
		$defaults = array(
			'type' => 'object',
			'subtype' => 'calendar',
			'relationship' => Calendar::EVENT_CALENDAR_RELATIONSHIP,
			'relationship_guid' => $this->guid,
			'limit' => false
		);

		$options = array_merge($defaults, $params);

		if ($public) {
			$options['metadata_name_value_pairs'][] = array(
				'name' => '__public_calendar',
				'value' => true
			);
		}

		if ($options['count']) {
			return elgg_get_entities_from_relationship($options);
		}

		return new ElggBatch('elgg_get_entities_from_relationship', $options);
	}
public function getCalendars($params = array(), $public = false) {
		$defaults = array(
			'type' => 'object',
			'subtype' => 'calendar',
			'relationship' => Calendar::EVENT_CALENDAR_RELATIONSHIP,
			'relationship_guid' => $this->guid,
			'limit' => false
		);

		$options = array_merge($defaults, $params);

		if ($public) {
			$options['metadata_name_value_pairs'][] = array(
				'name' => '__public_calendar',
				'value' => true
			);
		}

		if ($options['count']) {
			return elgg_get_entities_from_relationship($options);
		}

		return new ElggBatch('elgg_get_entities_from_relationship', $options);
	}
public function getCalendars ( $ params = array ( ) , $ public = false ) { $ defaults = array ( 'type' => 'object' , 'subtype' => 'calendar' , 'relationship' => Calendar :: EVENT_CALENDAR_RELATIONSHIP , 'relationship_guid' => $ this -> guid , 'limit' => false ) ; $ options = array_merge ( $ defaults , $ params ) ; if ( $ public ) { $ options [ 'metadata_name_value_pairs' ] [ ] = array ( 'name' => '__public_calendar' , 'value' => true ) ; } if ( $ options [ 'count' ] ) { return elgg_get_entities_from_relationship ( $ options ) ; } return new ElggBatch ( 'elgg_get_entities_from_relationship' , $ options ) ; }
Get all calendars this event is on

@param array custom parameters to override the default egef
@param bool $public - limit to only personal public calendars?
Get all calendars this event is on