Overview

Packages

  • None
  • Sesha

Classes

  • Horde_Core_UI_VarRenderer_Stockedit_Html
  • Sesha
  • Sesha_Api
  • Sesha_Driver
  • Sesha_Driver_Sql
  • Sesha_Exception
  • Sesha_Forms_Category
  • Sesha_Forms_CategoryDelete
  • Sesha_Forms_CategoryList
  • Sesha_Forms_Property
  • Sesha_Forms_PropertyDelete
  • Sesha_Forms_PropertyList
  • Sesha_Forms_Search
  • Sesha_Forms_Stock
  • Sesha_Forms_Type_Client
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: /**
 3:  * Copyright 2004-2011 Horde LLC (http://www.horde.org/)
 4:  *
 5:  * See the enclosed file LICENSE for license information (GPL). If you
 6:  * did not receive this file, see http://www.horde.org/licenses/gpl.php.
 7:  *
 8:  * @author  Bo Daley <bo@darkwork.net>
 9:  * @package Sesha
10:  */
11: 
12: class Sesha_Forms_PropertyList extends Horde_Form
13: {
14:     function __construct($vars)
15:     {
16:         parent::Horde_Form($vars);
17:         // This is probably wrong. The library should get the driver 
18:         // or the properties passed
19:         $sesha_driver = $GLOBALS['injector']->getInstance('Sesha_Factory_Driver')->create();
20:         $this->setButtons(array(_("Edit Property"), _("Delete Property")));
21:         $properties = $sesha_driver->getProperties();
22:         $params = array();
23:         foreach ($properties as $property) {
24:             $params[$property['property_id']] = $property['property'];
25:         }
26:         $title = !empty($title) ? $title : _("Edit a property");
27:         $this->setTitle($title);
28: 
29:         $this->addHidden('', 'actionID', 'text', false, false, null, array('edit_property'));
30:         if (!count($params)) {
31:             $fieldtype = 'invalid';
32:             $params = _("No properties are currently configured. Use the form below to add one.");
33:         } else {
34:             $fieldtype = 'enum';
35:         }
36:         $this->addVariable(_("Property"), 'property_id', $fieldtype, true, false, null, array($params));
37:     }
38: 
39: }
40: 
API documentation generated by ApiGen