Overview

Packages

  • Mnemo
  • None

Classes

  • Mnemo
  • Mnemo_Ajax_Application
  • Mnemo_Ajax_Imple_EditNote
  • Mnemo_Api
  • Mnemo_Driver
  • Mnemo_Driver_Kolab
  • Mnemo_Driver_Sql
  • Mnemo_Exception
  • Mnemo_Factory_Driver
  • Mnemo_Factory_Notepads
  • Mnemo_Form_CreateNotepad
  • Mnemo_Form_DeleteNotepad
  • Mnemo_Form_EditNotepad
  • Mnemo_Notepads_Base
  • Mnemo_Notepads_Default
  • Mnemo_Notepads_Kolab
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: /**
 3:  * Horde_Form for editing notepads.
 4:  *
 5:  * See the enclosed file LICENSE for license information (ASL). If you
 6:  * did not receive this file, see http://www.horde.org/licenses/apache.
 7:  *
 8:  * @package Mnemo
 9:  */
10: /**
11:  * The Mnemo_Form_EditNotepadclass provides the form for editing a notepad.
12:  *
13:  * @author  Chuck Hagenbuch <chuck@horde.org>
14:  * @package Mnemo
15:  */
16: class Mnemo_Form_EditNotepad extends Horde_Form
17: {
18:     /**
19:      * Notepad being edited
20:      */
21:     protected $_notepad;
22: 
23:     public function __construct(&$vars, $notepad)
24:     {
25:         $this->_notepad = &$notepad;
26:         parent::__construct($vars, sprintf(_("Edit %s"), $notepad->get('name')));
27: 
28:         $this->addHidden('', 'n', 'text', true);
29:         $this->addVariable(_("Name"), 'name', 'text', true);
30:         $this->addVariable(_("Description"), 'description', 'longtext', false, false, null, array(4, 60));
31: 
32:         $this->setButtons(array(_("Save")));
33:     }
34: 
35:     public function execute()
36:     {
37:         $this->_notepad->set('name', $this->_vars->get('name'));
38:         $this->_notepad->set('desc', $this->_vars->get('description'));
39:         $this->_notepad->save();
40: 
41:         return true;
42:     }
43: 
44: }
45: 
API documentation generated by ApiGen