1<?php 2 3/** 4 * OrangeHRM is a comprehensive Human Resource Management (HRM) System that captures 5 * all the essential functionalities required for any enterprise. 6 * Copyright (C) 2006 OrangeHRM Inc., http://www.orangehrm.com 7 * 8 * OrangeHRM is free software; you can redistribute it and/or modify it under the terms of 9 * the GNU General Public License as published by the Free Software Foundation; either 10 * version 2 of the License, or (at your option) any later version. 11 * 12 * OrangeHRM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 13 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 * See the GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License along with this program; 17 * if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * Boston, MA 02110-1301, USA 19 */ 20 21/** 22 * Description of DeleteOrEditCommentForm 23 * 24 * @author nirmal 25 */ 26class DeleteOrEditCommentForm extends BaseForm { 27 28 public function configure() { 29 $this->setWidgets($this->getWidgets()); 30 $this->setValidators($this->getValidators()); 31 $this->widgetSchema->setNameFormat($this->getNameFormat()); 32 } 33 34 public function getWidgets() { 35 $widgets = array('commentId' => new sfWidgetFormInputHidden(), 36 'textComment' => new sfWidgetFormInputHidden() 37 ); 38 return $widgets; 39 } 40 41 public function getValidators() { 42 $validators = array('commentId' => new sfValidatorString(array('required' => false)), 43 'textComment' => new sfValidatorString(array('required' => false)) 44 ); 45 return $validators; 46 } 47 48 public function getNameFormat() { 49 return 'deleteOrEditCommentForm[%s]'; 50 } 51 52 53} 54