Overview

Packages

  • Horde
    • Block
  • None
  • Ulaform

Classes

  • Ulaform
  • Ulaform_Action
  • Ulaform_Action_Mailto
  • Ulaform_Action_Sql
  • Ulaform_Api
  • Ulaform_Driver
  • Ulaform_Driver_Sql
  • Ulaform_Exception
  • Ulaform_Factory_Action
  • Ulaform_Factory_Driver
  • Overview
  • Package
  • Class
  • Tree

Class Ulaform_Driver_Sql

Ulaform_Driver_Sql Class

Copyright 2003-2012 Horde LLC (http://www.horde.org/)

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

Ulaform_Driver
Extended by Ulaform_Driver_Sql
Package: Ulaform
Author: Marko Djukic marko@oblo.com
Author: Vilius Ĺ umskas vilius@lnk.lt
Located at Driver/Sql.php
Methods summary
public
# __construct( array $params = array() )

Construct a new SQL storage object.

Construct a new SQL storage object.

Parameters

$params
The connection parameters

Throws

InvalidArguementException

Overrides

Ulaform_Driver::__construct()
public integer
# saveForm( array & $info )

Saves the passed form into the db, either inserting a new form if no form_id is available, or updating an existing form if a form_id has been passed.

Saves the passed form into the db, either inserting a new form if no form_id is available, or updating an existing form if a form_id has been passed.

Parameters

$info
An array with the form details.

Returns

integer
The form id.

Throws

Ulaform_Exception
public boolean
# saveField( array & $info )

Saves the passed field into the db, either inserting a new field if no field_id is available, or updating an existing field if a field_id has been passed. If no form_id is available will throw an exception.

Saves the passed field into the db, either inserting a new field if no field_id is available, or updating an existing field if a field_id has been passed. If no form_id is available will throw an exception.

Parameters

$info
$params An array with the field details.

Returns

boolean
True on success.

Throws

Horde_Exception_NotFound
Ulaform_Exception
public boolean
# sortFields( array & $info )

Sets the specified sort order to the fields in a form.

Sets the specified sort order to the fields in a form.

Parameters

$info
<p>An array with the field ids in a specific order.</p>

Returns

boolean
True on success.

Throws

Horde_Exception_NotFound
Ulaform_Exception
public array
# getForms( mixed $form_id = null )

Fetches the a list of available forms and the basic data.

Fetches the a list of available forms and the basic data.

Returns

array
An array of the available forms.

Throws

Ulaform_Exception
public array
# getAvailableForms( )

Fetches the a list of available forms to use.

Fetches the a list of available forms to use.

Returns

array
An array of the available forms.

Throws

Ulaform_Exception
public array
# getForm( integer $form_id, mixed $permission = Horde_Perms::SHOW )

Fetches all the data specific to the supplied form id.

Fetches all the data specific to the supplied form id.

Parameters

$form_id
The form id of the form to return.
$permission

Returns

array
The form data.

Throws

Horde_Exception_PermissionDenied
Horde_Exception_NotFound
Ulaform_Exception
public array
# getFields( integer $form_id, mixed $field_id = null )

Fetches the fields for a particular form.

Fetches the fields for a particular form.

Parameters

$form_id
The form id of the form to return.
$field_id

Returns

array
The fields.

Throws

Ulaform_Exception
public boolean
# deleteForm( integer $form_id )

Deletes a form and all of its fields from the database.

Deletes a form and all of its fields from the database.

Parameters

$form_id
The form id of the form to delete.

Returns

boolean
True on success.

Throws

Ulaform_Exception
public boolean
# deleteField( integer $field_id )

Deletes a field from the database.

Deletes a field from the database.

Parameters

$field_id
The field id of the field to delete.

Returns

boolean
True on success.

Throws

Ulaform_Exception
Methods inherited from Ulaform_Driver
getField(), getFieldsArray(), getFieldsList(), getFormsList(), hasPermission(), submitForm()
API documentation generated by ApiGen