engine/lib/calendar.php File Reference

(r6838/r3548)

Go to the source code of this file.

Classes

interface  Notable
 Calendar interface for events. More...

Packages

package  Elgg
 

Elgg CSS file.


Functions

 get_day_start ($day=null, $month=null, $year=null)
 Return a timestamp for the start of a given day (defaults today).
 get_day_end ($day=null, $month=null, $year=null)
 Return a timestamp for the end of a given day (defaults today).
 get_notable_entities ($start_time, $end_time, $type="", $subtype="", $owner_guid=0, $order_by="asc", $limit=10, $offset=0, $count=false, $site_guid=0, $container_guid=null)
 Return the notable entities for a given time period.
 get_notable_entities_from_metadata ($start_time, $end_time, $meta_name, $meta_value="", $entity_type="", $entity_subtype="", $owner_guid=0, $limit=10, $offset=0, $order_by="", $site_guid=0, $count=false)
 Return the notable entities for a given time period based on an item of metadata.
 get_noteable_entities_from_relationship ($start_time, $end_time, $relationship, $relationship_guid, $inverse_relationship=false, $type="", $subtype="", $owner_guid=0, $order_by="", $limit=10, $offset=0, $count=false, $site_guid=0)
 Return the notable entities for a given time period based on their relationship.
 get_todays_entities ($type="", $subtype="", $owner_guid=0, $order_by="", $limit=10, $offset=0, $count=false, $site_guid=0, $container_guid=null)
 Get all entities for today.
 get_todays_entities_from_metadata ($meta_name, $meta_value="", $entity_type="", $entity_subtype="", $owner_guid=0, $limit=10, $offset=0, $order_by="", $site_guid=0, $count=false)
 Get entities for today from metadata.
 get_todays_entities_from_relationship ($relationship, $relationship_guid, $inverse_relationship=false, $type="", $subtype="", $owner_guid=0, $order_by="", $limit=10, $offset=0, $count=false, $site_guid=0)
 Get entities for today from a relationship.
 list_notable_entities ($start_time, $end_time, $type="", $subtype="", $owner_guid=0, $limit=10, $fullview=true, $viewtypetoggle=false, $navigation=true)
 Returns a viewable list of entities for a given time period.
 list_todays_entities ($type="", $subtype="", $owner_guid=0, $limit=10, $fullview=true, $viewtypetoggle=false, $navigation=true)
 Return a list of today's entities.

Function Documentation

get_day_end ( day = null,
month = null,
year = null 
)

Return a timestamp for the end of a given day (defaults today).

Definition at line 53 of file calendar.php.

Referenced by get_todays_entities(), get_todays_entities_from_metadata(), get_todays_entities_from_relationship(), list_todays_entities(), and ElggEntity.setCalendarTimeAndDuration().

get_day_start ( day = null,
month = null,
year = null 
)

Return a timestamp for the start of a given day (defaults today).

Definition at line 45 of file calendar.php.

Referenced by get_todays_entities(), get_todays_entities_from_metadata(), get_todays_entities_from_relationship(), and list_todays_entities().

get_notable_entities ( start_time,
end_time,
type = "",
subtype = "",
owner_guid = 0,
order_by = "asc",
limit = 10,
offset = 0,
count = false,
site_guid = 0,
container_guid = null 
)

Return the notable entities for a given time period.

Parameters:
int $start_time The start time as a unix timestamp.
int $end_time The end time as a unix timestamp.
string $type The type of entity (eg "user", "object" etc)
string $subtype The arbitrary subtype of the entity
int $owner_guid The GUID of the owning user
string $order_by The field to order by; by default, time_created desc
int $limit The number of entities to return; 10 by default
int $offset The indexing offset, 0 by default
boolean $count Set to true to get a count rather than the entities themselves (limits and offsets don't apply in this context). Defaults to false.
int $site_guid The site to get entities for. Leave as 0 (default) for the current site; -1 for all sites.
int|array $container_guid The container or containers to get entities from (default: all containers).

Definition at line 72 of file calendar.php.

References $CONFIG, $container_guid, $count, $limit, $offset, $owner_guid, $query, $subtype, $type, get_access_sql_suffix(), get_data(), get_data_row(), get_subtype_id(), and sanitise_string().

Referenced by get_todays_entities(), and list_notable_entities().

get_notable_entities_from_metadata ( start_time,
end_time,
meta_name,
meta_value = "",
entity_type = "",
entity_subtype = "",
owner_guid = 0,
limit = 10,
offset = 0,
order_by = "",
site_guid = 0,
count = false 
)

Return the notable entities for a given time period based on an item of metadata.

Parameters:
int $start_time The start time as a unix timestamp.
int $end_time The end time as a unix timestamp.
mixed $meta_name
mixed $meta_value
string $entity_type The type of entity to look for, eg 'site' or 'object'
string $entity_subtype The subtype of the entity.
int $limit
int $offset
string $order_by Optional ordering.
int $site_guid The site to get entities for. Leave as 0 (default) for the current site; -1 for all sites.
true|false $count If set to true, returns the total number of entities rather than a list. (Default: false)
Returns:
int|array A list of entities, or a count if $count is set to true

Definition at line 212 of file calendar.php.

References $CONFIG, $count, $entity_subtype, $entity_type, $guid, $limit, $offset, $owner_guid, $query, get_access_sql_suffix(), get_data(), get_data_row(), get_metastring_id(), get_subtype_id(), and sanitise_string().

Referenced by get_todays_entities_from_metadata().

get_noteable_entities_from_relationship ( start_time,
end_time,
relationship,
relationship_guid,
inverse_relationship = false,
type = "",
subtype = "",
owner_guid = 0,
order_by = "",
limit = 10,
offset = 0,
count = false,
site_guid = 0 
)

Return the notable entities for a given time period based on their relationship.

Parameters:
int $start_time The start time as a unix timestamp.
int $end_time The end time as a unix timestamp.
string $relationship The relationship eg "friends_of"
int $relationship_guid The guid of the entity to use query
bool $inverse_relationship Reverse the normal function of the query to instead say "give me all entities for whome $relationship_guid is a $relationship of"
string $type
string $subtype
int $owner_guid
string $order_by
int $limit
int $offset
boolean $count Set to true if you want to count the number of entities instead (default false)
int $site_guid The site to get entities for. Leave as 0 (default) for the current site; -1 for all sites.
Returns:
array|int|false An array of entities, or the number of entities, or false on failure

Definition at line 333 of file calendar.php.

References $CONFIG, $count, $limit, $offset, $owner_guid, $query, $subtype, $type, get_access_sql_suffix(), get_data(), get_data_row(), get_subtype_id(), and sanitise_string().

get_todays_entities ( type = "",
subtype = "",
owner_guid = 0,
order_by = "",
limit = 10,
offset = 0,
count = false,
site_guid = 0,
container_guid = null 
)

Get all entities for today.

Parameters:
string $type The type of entity (eg "user", "object" etc)
string $subtype The arbitrary subtype of the entity
int $owner_guid The GUID of the owning user
string $order_by The field to order by; by default, time_created desc
int $limit The number of entities to return; 10 by default
int $offset The indexing offset, 0 by default
boolean $count Set to true to get a count rather than the entities themselves (limits and offsets don't apply in this context). Defaults to false.
int $site_guid The site to get entities for. Leave as 0 (default) for the current site; -1 for all sites.
int|array $container_guid The container or containers to get entities from (default: all containers).

Definition at line 434 of file calendar.php.

References $container_guid, $count, $limit, $offset, $owner_guid, $subtype, $type, get_day_end(), get_day_start(), and get_notable_entities().

get_todays_entities_from_metadata ( meta_name,
meta_value = "",
entity_type = "",
entity_subtype = "",
owner_guid = 0,
limit = 10,
offset = 0,
order_by = "",
site_guid = 0,
count = false 
)

Get entities for today from metadata.

Parameters:
mixed $meta_name
mixed $meta_value
string $entity_type The type of entity to look for, eg 'site' or 'object'
string $entity_subtype The subtype of the entity.
int $limit
int $offset
string $order_by Optional ordering.
int $site_guid The site to get entities for. Leave as 0 (default) for the current site; -1 for all sites.
true|false $count If set to true, returns the total number of entities rather than a list. (Default: false)
Returns:
int|array A list of entities, or a count if $count is set to true

Definition at line 456 of file calendar.php.

References $count, $entity_subtype, $entity_type, $limit, $offset, $owner_guid, get_day_end(), get_day_start(), and get_notable_entities_from_metadata().

get_todays_entities_from_relationship ( relationship,
relationship_guid,
inverse_relationship = false,
type = "",
subtype = "",
owner_guid = 0,
order_by = "",
limit = 10,
offset = 0,
count = false,
site_guid = 0 
)

Get entities for today from a relationship.

Parameters:
string $relationship The relationship eg "friends_of"
int $relationship_guid The guid of the entity to use query
bool $inverse_relationship Reverse the normal function of the query to instead say "give me all entities for whome $relationship_guid is a $relationship of"
string $type
string $subtype
int $owner_guid
string $order_by
int $limit
int $offset
boolean $count Set to true if you want to count the number of entities instead (default false)
int $site_guid The site to get entities for. Leave as 0 (default) for the current site; -1 for all sites.
Returns:
array|int|false An array of entities, or the number of entities, or false on failure

Definition at line 479 of file calendar.php.

References $count, $limit, $offset, $owner_guid, $subtype, $type, get_day_end(), and get_day_start().

list_notable_entities ( start_time,
end_time,
type = "",
subtype = "",
owner_guid = 0,
limit = 10,
fullview = true,
viewtypetoggle = false,
navigation = true 
)

Returns a viewable list of entities for a given time period.

See also:
elgg_view_entity_list
Parameters:
int $start_time The start time as a unix timestamp.
int $end_time The end time as a unix timestamp.
string $type The type of entity (eg "user", "object" etc)
string $subtype The arbitrary subtype of the entity
int $owner_guid The GUID of the owning user
int $limit The number of entities to display per page (default: 10)
true|false $fullview Whether or not to display the full view (default: true)
true|false $viewtypetoggle Whether or not to allow gallery view
true|false $pagination Display pagination? Default: true
Returns:
string A viewable list of entities

Definition at line 502 of file calendar.php.

References $count, $entities, $fullview, $limit, $offset, $owner_guid, $subtype, $type, elgg_view_entity_list(), get_input(), and get_notable_entities().

Referenced by list_todays_entities().

list_todays_entities ( type = "",
subtype = "",
owner_guid = 0,
limit = 10,
fullview = true,
viewtypetoggle = false,
navigation = true 
)

Return a list of today's entities.

See also:
list_notable_entities
Parameters:
string $type The type of entity (eg "user", "object" etc)
string $subtype The arbitrary subtype of the entity
int $owner_guid The GUID of the owning user
int $limit The number of entities to display per page (default: 10)
true|false $fullview Whether or not to display the full view (default: true)
true|false $viewtypetoggle Whether or not to allow gallery view
true|false $pagination Display pagination? Default: true
Returns:
string A viewable list of entities

Definition at line 524 of file calendar.php.

References $fullview, $limit, $owner_guid, $subtype, $type, get_day_end(), get_day_start(), and list_notable_entities().

 All Classes Namespaces Files Functions Variables Enumerations
Generated on Thu Sep 2 00:13:01 2010 for Elgg by  doxygen 1.6.3