home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (date-valarm.tpl.php)

This example Drupal source code file (date-valarm.tpl.php) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

begin:valarm, email, empty, end:valarm, endif, if, php

The date-valarm.tpl.php Drupal example source code

// $Id$
 * $alarm
 *   An array with the following information about each alarm:
 *   $alarm['action'] - the action to take, either 'DISPLAY' or 'EMAIL'
 *   $alarm['trigger'] - the time period for the trigger, like -P2D.
 *   $alarm['repeat'] - the number of times to repeat the alarm.
 *   $alarm['duration'] - the time period between repeated alarms, like P1D.
 *   $alarm['description'] - the description of the alarm.
 *   An email alarm should have two additional parts:
 *   $alarm['email'] - a comma-separated list of email recipients.
 *   $alarm['summary'] - the subject of the alarm email.
ACTION:<?php print $alarm['action']  . "\n";?>
<?php if (!empty($alarm['trigger'])): ?>
TRIGGER:<?php print $alarm['trigger']  . "\n"; ?> 
<?php endif; ?>
<?php if (!empty($alarm['repeat'])): ?>
REPEAT:<?php print $alarm['repeat']  . "\n"; ?>
<?php endif; ?>
<?php if (!empty($alarm['duration'])): ?>
DURATION:<?php print $alarm['duration']  . "\n"; ?>
<?php endif; ?>
<?php if ($alarm['action'] == 'EMAIL'): ?>
ATTENDEE:MAILTO:<?php print $alarm['email']  . "\n" ?>
SUMMARY:<?php print $alarm['summary']  . "\n" ?>
<?php endif; ?>
DESCRIPTION:<?php print $alarm['description']  . "\n" ?>

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal date-valarm.tpl.php source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.