Documentation

Beatnik
in package

Beatnik base class

Copyright 2005-2007 Alkaloid Networks http://www.alkaloid.net

See the enclosed file LICENSE for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.

Tags
author

Ben Klang ben@alkaloid.net

Table of Contents

autogenerate()  : mixed
Autogenerate a set of records from a template defined in config/autogenerate.php
fieldSort()  : int
Callback for usort to make field data print in a friendly order
getRecFields()  : mixed
getRecTypes()  : mixed
Get possible records
hasPermission()  : bool
Checks for the given permissions for the current user on the given permissions node. Optionally check for the requested permssion for a given number of steps up the tree.
incrementSerial()  : int
Increments a domain serial number.
needCommit()  : mixed
Check or set a flag to show that a domain has outstanding changes that need to be committed.
notifyCommits()  : mixed

Methods

autogenerate()

Autogenerate a set of records from a template defined in config/autogenerate.php

public static autogenerate(object &$vars) : mixed
Parameters
$vars : object

Horde_Variables object from Autogenerate form

Return values
mixed

true on success, PEAR::Error on failure

fieldSort()

Callback for usort to make field data print in a friendly order

public static fieldSort(mixed $a, mixed $b) : int
Parameters
$a : mixed

First sort variable

$b : mixed

Second sort variable

Return values
int

-1, 0, 1 based on relative sort order

getRecFields()

public static getRecFields(mixed $recordtype) : mixed
Parameters
$recordtype : mixed
Return values
mixed

getRecTypes()

Get possible records

public static getRecTypes() : mixed

The keys of this array are the IDs of the record type. The values are a human friendly description of the record type.

Return values
mixed

hasPermission()

Checks for the given permissions for the current user on the given permissions node. Optionally check for the requested permssion for a given number of steps up the tree.

public static hasPermission(string $permname[, mixed $permmask = null ], mixed $numparents) : bool
Parameters
$permname : string

Name of the permission to check

$permmask : mixed = null
$numparents : mixed
Return values
bool

True if the user has permission, False if not

incrementSerial()

Increments a domain serial number.

public static incrementSerial(int $serial) : int
Parameters
$serial : int

Serial number to be incremented

Return values
int

Incremented serial number

needCommit()

Check or set a flag to show that a domain has outstanding changes that need to be committed.

public static needCommit([mixed $domain = null ][, mixed $needcommit = null ]) : mixed
Parameters
$domain : mixed = null
$needcommit : mixed = null
Return values
mixed

Array of domains needing committing if no arguments are passed. Boolean if only a $domain is passed: True if $domain has outstanding changes, false if not. Mixed if both $domain and $needcommit are passed. True on success, PEAR::Error on error.

notifyCommits()

public static notifyCommits() : mixed
Return values
mixed

Search results