ePages 7.23.0 - DE_EPAGES/Presentation/API/History.pm

Package DE_EPAGES::Presentation::API::History

Implements helper functions for the event history and favorites. Use the TLE function DE_EPAGES::Presentation::API::TLE::HistoryHandler::SaveHistory to add new history entries from within a template. Use the ChangeAction CopyHistoryToFavorite to convert a history entry to a favorite.

@EXPORT_OK
GetFavorites
GetHistoryName

Functions

GetFavorites
GetHistoryName

GetFavorites

Returns the list of favorites of the user. If the user currently has more than $MaxEntries favorites, then the oldest entries are deleted until the number of favorites is $MaxEntries.

Syntax
$ahFavorites = GetFavorites($UserID);
$ahFavorites = GetFavorites($UserID, $MaxEntries);
Input
$UserID (int)
user identifier
$MaxEntries (int)
maximum count of entries (optional)
Return
$ahFavorites (reference to array of hashes)
favorite events with following keys:
  • EventFavoriteID - view anchor indentifier (primary key)- int
  • ObjectID - object id (optional)- int
  • UserID - user id - int
  • Name - title or name of page - nvarchar(255)
  • URI - Uniform Resource Identifiers of get request - varchar(500)

GetHistoryName

Returns the name of the object that is used for the history box in the back-office. Note that the global variable $LANGUAGEID must be set when this function is called.

Syntax
$HistoryName = GetHistoryName($Object, $ViewAction, $Name);
Input
$Object (object)
view object
$ViewAction (object)
view action
$Name (string)
(optional) object name to use instead of the generic
$Object->get('HistoryName')
Return
$HistoryName (string)
name for history