\Beatnik

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.

Summary

Methods
Properties
Constants
getRecTypes()
getRecFields()
needCommit()
notifyCommits()
hasPermission()
autogenerate()
incrementSerial()
fieldSort()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

getRecTypes()

getRecTypes() 

Get possible records

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

getRecFields()

getRecFields(  $recordtype) 

Parameters

$recordtype

needCommit()

needCommit(  $domain = null,   $needcommit = null) : mixed

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

Parameters

$domain
$needcommit

Returns

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()

notifyCommits() 

hasPermission()

hasPermission(string  $permname,   $permmask = null,   $numparents) : boolean

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.

Parameters

string $permname

Name of the permission to check

$permmask
$numparents

Returns

boolean —

True if the user has permission, False if not

autogenerate()

autogenerate(object  $vars) : mixed

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

Parameters

object $vars

Horde_Variables object from Autogenerate form

Returns

mixed —

true on success, PEAR::Error on failure

incrementSerial()

incrementSerial(integer  $serial) : integer

Increments a domain serial number.

Parameters

integer $serial

Serial number to be incremented

Returns

integer —

Incremented serial number

fieldSort()

fieldSort(mixed  $a, mixed  $b) : integer

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

Parameters

mixed $a

First sort variable

mixed $b

Second sort variable

Returns

integer —

-1, 0, 1 based on relative sort order