Documentation

Add

mixed CEventType::Add(
 array fields
)

The method adds adds the mail event type. Returns the ID of the added template. In case of error the method will return false, and the LAST_ERROR property will contain the error description. Static method.

Parameters

ParameterDescription
fields Array of field values in the array("field"=>"value" [, ...]) format. The fields can be the following:
  • LID - site ID;
  • EVENT_NAME - mail event type ID;
  • NAME - header of the mail event type;
  • DESCRIPTION - description defining fields of the mail event type.

See Also

Examples of use

<?
function UET($EVENT_NAME, $NAME, $LID, $DESCRIPTION)
{
    $et = new CEventType;
    $et->Add(array(
        "LID"           => $LID,
        "EVENT_NAME"    => $EVENT_NAME,
        "NAME"          => $NAME,
        "DESCRIPTION"   => $DESCRIPTION
        ));
}

UET(
"ADV_BANNER_STATUS_CHANGE","Banner state has changed","en",
"
#EMAIL_TO# - EMail of the message receiver (#OWNER_EMAIL#)
#ADMIN_EMAIL# - EMail of the users with roles \"banner manager\" and \"administrator\"
#ADD_EMAIL# - EMail of the users permitted to manage the contract banners
#STAT_EMAIL# - EMail of the users permitted to view the contract banners
#EDIT_EMAIL# - EMail of the users permitted to modify some contract fields
#OWNER_EMAIL# - EMail of the users with any permission for the contract
#BCC# - BCC (#ADMIN_EMAIL#)
#ID# - banner ID
#CONTRACT_ID# - contract ID
#CONTRACT_NAME# - contract header
#TYPE_SID# - type ID
#TYPE_NAME# - header type
#STATUS# - status
#STATUS_COMMENTS# - status comment
#NAME# - banner header
#GROUP_SID# - banner group
#INDICATOR# - whether the banner is displayed or not
#ACTIVE# - active state flag of the banner [Y | N]
#MAX_SHOW_COUNT# - maximum banner shows
#SHOW_COUNT# - number of banner shows
#MAX_CLICK_COUNT# - maximum banner clicks
#CLICK_COUNT# - number of banner clicks
#DATE_LAST_SHOW# - date of the last banner show
#DATE_LAST_CLICK# - date of the last banner click
#DATE_SHOW_FROM# - date the banner is published
#DATE_SHOW_TO# - date the banner is revoked
#IMAGE_LINK# - URL of the banner image
#IMAGE_ALT# - tooltip text
#URL# - banner link URL
#URL_TARGET# - target frame to open the banner URL
#CODE# - banner code
#CODE_TYPE# - type of the banner code (text | html)
#COMMENTS# - banner comments
#DATE_CREATE# - date of the banner creation
#CREATED_BY# - person who created the banner
#DATE_MODIFY# - date of the banner modification
#MODIFIED_BY# - person who modified the banner
"
);
?>


© «Bitrix24», 2001-2024
Up