Source for file pnadminapi.php
Documentation is available at pnadminapi.php
* Zikula Application Framework
* @copyright (c) 2002, Zikula Development Team
* @link http://www.zikula.org
* @version $Id: pnadminapi.php 24342 2008-06-06 12:03:14Z markwest $
* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
* @package Zikula_Value_Addons
* Create a new Ephemerids item
* @param 'did' the day of the emphererid
* @param 'mid' the month of the emphererid
* @param 'yid' the year of the emphererid
* @param 'content' the ephmerid description
* @param 'language' the language of the ephemerid
* @return mixed Ephemerids item ID on success, false on failure
if ((!isset ($args['did'])) ||
(!isset ($args['mid'])) ||
(!isset ($args['yid'])) ||
(!isset ($args['content'])) ||
(!isset ($args['language']))) {
$item = array('did' => $args['did'],
'content' => $args['content'],
'language' => $args['language']);
// Let any hooks know that we have created a new item.
pnModCallHooks('item', 'create', $item['eid'], array('module' => 'Ephemerids'));
// Return the id of the newly created item to the calling process
* Delete a Ephemerids item
* @param 'eid' the id of the ephemerid
* @return bool true on success, false on failure
if (!isset ($args['eid']) || !is_numeric($args['eid'])) {
// The user API function is called.
$item = pnModAPIFunc('Ephemerids', 'user', 'get', array('eid' => $args['eid']));
// Let any hooks know that we have deleted an item.
pnModCallHooks('item', 'delete', $args['eid'], array('module' => 'Ephemerids'));
// Let the calling process know that we have finished successfully
* Update a Ephemerids item
* @param $args['eid'] the ID of the item
* @param $args['did'] the day of the ephemerid
* @param $args['mid'] the month of the ephemerid
* @param $args['yid'] the year of the ephemerid
* @param $args['content'] the event description
* @param $args['language'] the language of the item
* @return bool true on update success, false on failiure
if ((!isset ($args['eid'])) ||
(!isset ($args['did'])) ||
(!isset ($args['mid'])) ||
(!isset ($args['yid'])) ||
(!isset ($args['content'])) ||
(!isset ($args['language']))) {
// The user API function is called.
$item = pnModAPIFunc('Ephemerids', 'user', 'get', array('eid' => $args['eid']));
$item = array('eid' => $args['eid'],
'content' => $args['content'],
'language' => $args['language']);
// Let any hooks know that we have updated an item.
pnModCallHooks('item', 'update', $args['eid'], array('module' => 'Ephemerids'));
// Let the calling process know that we have finished successfully
* get available admin panel links
* @return array array of admin links
|