public function __construct($options = null) { $this->_addSubmitSaveClose = false; parent::__construct($options); $galleryID = $options['galleryID']; $imageSrc = ""; // show online $showOnline = new Zend_Form_Element_Checkbox('GI_Online'); $showOnline->setValue(1); $showOnline->setLabel($this->getView()->getCibleText('form_label_showOnline')); $showOnline->setDecorators(array('ViewHelper', array('label', array('placement' => 'append')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'label_after_checkbox')))); $this->addElement($showOnline); // image position $position = new Zend_Form_Element_Text('GI_Position'); $position->setLabel($this->getView()->getCibleText('form_label_position')); $position->setRequired(true); $position->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->getView()->getCibleText('validation_message_empty_field')))); $position->addValidator('Int', true, array('messages' => array('notInt' => $this->getView()->getCibleText('validation_message_int_field')))); $this->addElement($position); // IMAGE /* $imageSrc = ""; $imageView = new Zend_Form_Element_Image('imageView',array('src' => $imageSrc)); $imageView->setOrder(4); $this->addElement($imageView); */ if ($galleryID != "") { $imageTmp = new Zend_Form_Element_Hidden('ImageSrc_tmp'); $imageTmp->setDecorators(array('ViewHelper', array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'openOnly' => true)))); $this->addElement($imageTmp); $imageOrg = new Zend_Form_Element_Hidden('ImageSrc_original'); $imageOrg->setDecorators(array('ViewHelper')); $this->addElement($imageOrg); $imageView = new Zend_Form_Element_Image('ImageSrc_preview', array('src' => $imageSrc, 'onclick' => 'return false;')); $imageView->setDecorators(array('ViewHelper', array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'closeOnly' => true)))); $this->addElement($imageView); $imagePicker = new Cible_Form_Element_ImageGalleryPicker('ImageSrc', array('associatedElement' => 'imageView', 'galleryID' => $galleryID)); $imagePicker->removeDecorator('label'); $this->addElement($imagePicker); } // Title $title = new Zend_Form_Element_Text('II_Title'); $title->setLabel($this->getView()->getCibleText('form_label_title'))->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->getView()->getCibleText('validation_message_empty_field'))))->setAttrib('class', 'stdTextInput'); $this->addElement($title); // Description $title = new Zend_Form_Element_Text('II_Description'); $title->setLabel($this->getView()->getCibleText('form_label_description'))->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->getView()->getCibleText('validation_message_empty_field'))))->setAttrib('class', 'stdTextInput'); $this->addElement($title); }
public function __construct($options = null) { $this->_addSubmitSaveClose = true; parent::__construct($options); $this->setName('page'); //$imageSrc = $options['imageSrc']; $pageID = $options['pageID']; $imageHeaderArray = $options['imageHeaderArray']; // contains the id of the page $id = new Zend_Form_Element_Hidden('id'); $id->removeDecorator('Label'); $id->removeDecorator('HtmlTag'); // input text for the title of the page $title = new Zend_Form_Element_Text('PI_PageTitle'); $title->setLabel($this->getView()->getCibleText('label_titre_page'))->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty', true, array('messages' => Cible_Translation::getCibleText('error_field_required')))->setAttrib('class', 'stdTextInput')->setAttrib('onBlur', 'javascript:fillInControllerName();'); $lblTit = $title->getDecorator('Label'); $lblTit->setOption('class', $this->_labelCSS); // input text for the index of the page $uniqueIndexValidator = new Zend_Validate_Db_NoRecordExists('PagesIndex', 'PI_PageIndex'); $uniqueIndexValidator->setMessage($this->getView()->getCibleText('label_index_already_exists'), Zend_Validate_Db_NoRecordExists::ERROR_RECORD_FOUND); $reservedWordValidator = new Cible_Validate_Db_NoRecordExists('Modules', 'M_MVCModuleTitle'); $reservedWordValidator->setMessage($this->getView()->getCibleText('label_index_reserved'), Zend_Validate_Db_NoRecordExists::ERROR_RECORD_FOUND); $index = new Zend_Form_Element_Text('PI_PageIndex'); $index->setLabel($this->getView()->getCibleText('label_name_controller'))->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addFilter('StringToLower')->addValidator('NotEmpty', true, array('messages' => Cible_Translation::getCibleText('error_field_required')))->addValidator('stringLength', true, array(1, 50, 'messages' => array(Zend_Validate_StringLength::TOO_SHORT => $this->getView()->getCibleText('label_index_more_char'), Zend_Validate_StringLength::TOO_LONG => $this->getView()->getCibleText('label_index_less_char'))))->addValidator('regex', true, array('/^[a-z0-9][a-z0-9_-]*[a-z0-9]$/', 'messages' => $this->getView()->getCibleText('label_only_character_allowed')))->addValidator($uniqueIndexValidator, true)->addValidator($reservedWordValidator, true)->setAttrib('class', 'stdTextInput'); $lblId = $index->getDecorator('Label'); $lblId->setOption('class', $this->_labelCSS); // textarea for the meta and title of the page $metaTitle = new Zend_Form_Element_Textarea('PI_MetaTitle'); $metaTitle->setLabel('Titre (meta)')->setRequired(false)->addFilter('StripTags')->addFilter('StringTrim')->setAttrib('class', 'stdTextareaShort'); $lblMetaTitle = $metaTitle->getDecorator('Label'); $lblMetaTitle->setOption('class', $this->_labelCSS); // textarea for the meta description of the page $metaDescription = new Zend_Form_Element_Textarea('PI_MetaDescription'); $metaDescription->setLabel($this->getView()->getCibleText('label_description_meta'))->setRequired(false)->addFilter('StripTags')->addFilter('StringTrim')->setAttrib('class', 'stdTextareaShort'); $lblMetaDescr = $metaDescription->getDecorator('Label'); $lblMetaDescr->setOption('class', $this->_labelCSS); // textarea for the meta keywords of the page $metaKeyWords = new Zend_Form_Element_Textarea('PI_MetaKeywords'); $metaKeyWords->setLabel($this->getView()->getCibleText('label_keywords_meta'))->setRequired(false)->addFilter('StripTags')->addFilter('StringTrim')->setAttrib('class', 'stdTextareaShort'); $lblMetaKey = $metaKeyWords->getDecorator('Label'); $lblMetaKey->setOption('class', $this->_labelCSS); // textarea for the meta keywords of the page $metaOthers = new Zend_Form_Element_Textarea('PI_MetaOther'); $metaOthers->setLabel($this->getView()->getCibleText('label_other_meta'))->setRequired(false)->addFilter('StripTags')->addFilter('StringTrim')->setAttrib('class', 'stdTextareaShort'); $lblMetaOther = $metaOthers->getDecorator('Label'); $lblMetaOther->setOption('class', $this->_labelCSS); // select box for the templates $layout = new Zend_Form_Element_Select('P_LayoutID'); $layout->setLabel($this->getView()->getCibleText('label_layout_page'))->setAttrib('class', 'stdSelect'); // select box for the templates $template = new Zend_Form_Element_Select('P_ViewID'); $template->setLabel($this->getView()->getCibleText('label_model_page'))->setAttrib('class', 'stdSelect'); // checkbox for the status (0 = offline, 1 = online) $status = new Zend_Form_Element_Checkbox('PI_Status'); $status->setValue(1); $status->setLabel($this->getView()->getCibleText('form_check_label_online')); $status->setDecorators(array('ViewHelper', array('label', array('placement' => 'append')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'label_after_checkbox')))); // checkbox for the show title of the page (0 = offline, 1 = online) $showTitle = new Zend_Form_Element_Checkbox('P_ShowTitle'); $showTitle->setValue(1); $showTitle->setLabel($this->getView()->getCibleText('form_check_label_show_title')); $showTitle->setDecorators(array('ViewHelper', array('label', array('placement' => 'append')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'label_after_checkbox')))); // image group // ImageSrc /*$imageSrc = new Zend_Form_Element_Select('P_BannerGroupID'); $imageSrc->setLabel($this->getView()->getCibleText('form_banner_image_group_extranet'))->setAttrib('class','stdSelect'); $imageSrc->addMultiOption('', 'Sans image'); $group = new GroupObject(); $groupArray = $group->groupCollection(); foreach ($groupArray as $group1) { $imageSrc->addMultiOption($group1['BG_ID'],$group1['BG_Name']); }*/ // page image $imageSrc = new Zend_Form_Element_Select('PI_TitleImageSrc'); $imageSrc->setLabel("Image de l'entête")->setAttrib('class', 'stdSelect'); $imageSrc->addMultiOption('', 'Sans image'); $i = 1; foreach ($imageHeaderArray as $img => $path) { $imageSrc->addMultiOption($path, $path); $i++; } $altImage = new Zend_Form_Element_Text('PI_AltPremiereImage'); $altImage->setLabel($this->getView()->getCibleText('label_altFirstImage'))->setAttrib('class', 'stdTextInput'); // add element to the form $this->addElements(array($title, $index, $status, $showTitle, $layout, $template, $imageSrc, $altImage, $metaTitle, $metaDescription, $metaKeyWords, $metaOthers, $id)); }
public function __construct($options = null) { $this->_addSubmitSaveClose = true; parent::__construct($options); $this->setName('page'); $imageSrc = $options['imageSrc']; $isNewImage = $options['isNewImage']; $menuId = $options['menuId']; if ($menuId == '') { $pathTmp = "../../../../../data/images/menu/tmp"; } else { $pathTmp = "../../../../../data/images/menu/{$menuId}/tmp"; } // input text for the title of the page $title = new Zend_Form_Element_Text('MenuTitle'); $title->setLabel(Cible_Translation::getCibleText('form_label_menu_title'))->setRequired(true)->addValidator('NotEmpty', true, array('messages' => Cible_Translation::getCibleText('error_field_required')))->setAttrib('class', 'stdTextInput'); $this->addElement($title); $menuItemType = new Zend_Form_Element_Radio('menuItemType'); $menuItemType->setLabel(Cible_Translation::getCibleText('form_label_menu_type'))->addMultiOption('page', Cible_Translation::getCibleText('form_label_menu_type_page'))->addMultiOption('placeholder', Cible_Translation::getCibleText('form_label_menu_type_placeholder'))->addMultiOption('external', Cible_Translation::getCibleText('form_label_menu_type_external'))->setValue('page')->setAttrib('onclick', 'javascript:openTypePanel(this.value)')->setSeparator(''); $this->addElement($menuItemType); $menuItemSecured = new Zend_Form_Element_Radio('menuItemSecured'); $menuItemSecured->setLabel(Cible_Translation::getCibleText('manage_block_secured_menu_status'))->addMultiOption('0', Cible_Translation::getCibleText('button_no'))->addMultiOption('1', Cible_Translation::getCibleText('button_yes'))->setValue('0')->setSeparator(''); $this->addElement($menuItemSecured); $controllerName = new Zend_Form_Element_Text('ControllerName'); $controllerName->setLabel(Cible_Translation::getCibleText('form_label_menu_destination_page'))->setAttrib('onfocus', "openPagePicker('page-picker-pagePicker');")->setRequired(true)->addValidator('NotEmpty', true, array('messages' => Cible_Translation::getCibleText('error_field_required')))->setAttrib('class', 'stdTextInput'); $this->addElement($controllerName); $pagePicker = new Cible_Form_Element_PagePicker('pagePicker', array('menu' => 'Principal', 'associatedElement' => 'ControllerName', 'onclick' => "javascript:closePagePicker(\"page-picker-pagePicker\")")); $pagePicker->setLabel(Cible_Translation::getCibleText('form_label_page_picker'))->setRequired(true)->addValidator('NotEmpty', true, array('messages' => Cible_Translation::getCibleText('error_page_selection_required'))); $pagePicker->setDecorators(array('ViewHelper', array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => "page-picker", 'id' => "page-picker-pagePicker")))); $this->addElement($pagePicker); $this->addDisplayGroup(array('ControllerName', 'pagePicker'), 'pageSelectionGroup'); $this->getDisplayGroup('pageSelectionGroup')->setAttrib('class', 'pageSelectionGroup')->removeDecorator('DtDdWrapper'); $link = new Zend_Form_Element_Text('MenuLink'); $link->setLabel(Cible_Translation::getCibleText('form_label_menu_destination_link'))->setRequired(true)->addValidator('NotEmpty', true, array('messages' => Cible_Translation::getCibleText('error_field_required')))->addPrefixPath('Cible', 'Cible')->setAttrib('class', 'stdTextInput'); $this->addElement($link); // input text for the css li $style = new Zend_Form_Element_Text('MenuTitleStyle'); $style->setLabel(Cible_Translation::getCibleText('form_label_menu_title_style'))->setAttrib('class', 'stdTextInput'); $this->addElement($style); $this->addDisplayGroup(array('MenuLink'), 'externalLinkSelectionGroup'); $this->getDisplayGroup('externalLinkSelectionGroup')->setAttrib('class', 'externalLinkSelectionGroup')->setAttrib('style', 'display: none')->removeDecorator('DtDdWrapper'); // Uses image $loadImage = new Zend_Form_Element_Checkbox('loadImage'); $loadImage->setLabel($this->getView()->getCibleText('form_label_menu_load_image')); $loadImage->removeDecorator('DtDdWrapper'); $loadImage->setDecorators(array('ViewHelper', array('label', array('placement' => 'append')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'label_after_checkbox')))); // Show this menu item $MID_Show = new Zend_Form_Element_Checkbox('MID_Show'); $MID_Show->setValue(1); $MID_Show->setLabel($this->getView()->getCibleText('form_label_menu_show_item')); $MID_Show->removeDecorator('DtDdWrapper'); $MID_Show->setDecorators(array('ViewHelper', array('label', array('placement' => 'append')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'label_after_checkbox')))); $this->addElement($MID_Show); $this->addElement($loadImage); // hidden specify if new image for the news $newImage = new Zend_Form_Element_Hidden('isNewImage', array('value' => $isNewImage)); $newImage->removeDecorator('Label'); $this->addElement($newImage); // To allow to display title and image $imgTitle = new Zend_Form_Element_Checkbox('menuImgAndTitle'); $imgTitle->setLabel($this->getView()->getCibleText('form_label_menu_display_image_and_title')); $imgTitle->removeDecorator('DtDdWrapper'); $imgTitle->setDecorators(array('ViewHelper', array('label', array('placement' => 'append')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'label_after_checkbox')))); $this->addElement($imgTitle); // IMAGE $imageTmp = new Zend_Form_Element_Hidden('menuImage_tmp'); $imageTmp->removeDecorator('Label'); $this->addElement($imageTmp); $imageOrg = new Zend_Form_Element_Hidden('menuImage_original'); $imageOrg->removeDecorator('Label'); $this->addElement($imageOrg); $imageView = new Zend_Form_Element_Image('menuImage_preview', array('onclick' => 'return false;')); $imageView->setImage($imageSrc)->removeDecorator('DtDdWrapper'); $this->addElement($imageView); $imagePicker = new Cible_Form_Element_ImagePicker('menuImage', array('onchange' => "document.getElementById('imageView').src = document.getElementById('menuImage').value", 'associatedElement' => 'menuImage_preview', 'pathTmp' => $pathTmp, 'contentID' => $menuId)); $imagePicker->removeDecorator('Label'); $this->addElement($imagePicker); $this->addDisplayGroup(array('menuImgAndTitle', 'isNewImage', 'menuImage_tmp', 'menuImage_original', 'menuImage_preview', 'menuImage'), 'imageGroup'); $this->getDisplayGroup('imageGroup')->setAttrib('class', 'imageGroup')->setAttrib('style', 'display: none')->removeDecorator('DtDdWrapper'); }
public function __construct($options = null) { parent::__construct($options); $this->setAttrib('class', 'form_block'); $baseDir = $options['baseDir']; $pageID = $options['pageID']; // contains the id of the page $id = new Zend_Form_Element_Hidden('id'); $id->removeDecorator('Label'); $id->removeDecorator('HtmlTag'); $this->addElement($id); if (isset($options['moduleName'])) { $this->setName($options['moduleName']); } // input text for the title of the text module $blockTitle = new Zend_Form_Element_Text('BI_BlockTitle'); $blockTitle->setLabel($this->getView()->getCibleText('form_label_title'))->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->getView()->getCibleText('validation_message_empty_field'))))->setAttrib('class', 'stdTextInput'); $this->addElement($blockTitle); // select box for the position of the module $security = new Zend_Form_Element_Select('B_Secured'); $security->setLabel($this->getView()->getCibleText('manage_block_secured_status'))->setAttrib('class', 'stdSelect')->addMultiOption('0', $this->getView()->getCibleText('manage_block_secured_none'))->addMultiOption('1', $this->getView()->getCibleText('manage_block_secured_logged'))->addMultiOption('2', $this->getView()->getCibleText('manage_block_secured_notlog'))->setRegisterInArrayValidator(false); $this->addElement($security); // checkbox for determine if show block title in frontend $showBlockTitle = new Zend_Form_Element_Hidden('B_ShowHeader'); $showBlockTitle->removeDecorator('Label'); $showBlockTitle->setValue(0); $this->addElement($showBlockTitle); $_request = Zend_Controller_Front::getInstance()->getRequest(); $_action = $_request->getActionName(); if ($_action == 'add-block') { // select box for the zone of the module $zone = new Zend_Form_Element_Select('B_ZoneID'); $zone->setLabel($this->getView()->getCibleText('form_label_zone'))->setAttrib('class', 'largeSelect'); $this->addElement($zone); // select box for the position of the module $position = new Zend_Form_Element_Select('B_Position'); $position->setLabel($this->getView()->getCibleText('form_label_position'))->setAttrib('class', 'largeSelect')->setRegisterInArrayValidator(false); $this->addElement($position); } // submit button (save) $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel($this->getView()->getCibleText('button_add'))->setAttrib('id', 'submitSave')->setAttrib('class', 'stdButton')->removeDecorator('DtDdWrapper')->removeDecorator('Label'); $this->addElement($submit); // cancel button (don't save and return to the main page) $cancel = new Zend_Form_Element_Button('cancel'); $cancel->setLabel($this->getView()->getCibleText('button_cancel'))->setAttrib('class', 'stdButton')->setAttrib('onclick', "document.location.href='{$baseDir}/page/manage/index/ID/{$pageID}'")->removeDecorator('DtDdWrapper')->removeDecorator('Label'); $this->addElement($cancel); // create an action display group with element name previously added to the form $this->addDisplayGroup(array('submit', 'cancel'), 'actions'); // Set the decorators we want for the display group $this->setDisplayGroupDecorators(array('FormElements', 'Fieldset', array('HtmlTag', array('tag' => 'dd')))); $viewSelector = new Zend_Form_Element_Select('Param999'); $viewSelector->setLabel($this->getView()->getCibleText('form_select_label_associated_view'))->setAttrib('class', 'stdSelect')->setOrder(1); if ($this->_moduleName) { foreach (Cible_FunctionsModules::getAvailableViews($this->_moduleName) as $view) { $viewSelector->addMultiOption($view['MV_Name'], $this->getView()->getCibleText("form_select_option_view_{$this->_moduleName}_{$view['MV_Name']}")); } } if (count($viewSelector->options) == 0) { $viewSelector->addMultiOption('index', $this->getView()->getCibleText("form_select_option_view_default_index")); } $this->addElement($viewSelector); $this->addDisplayGroup(array('Param999'), 'parameters'); $parameters = $this->getDisplayGroup('parameters'); //$parameters->setLegend($this->_view->getCibleText('form_parameters_fieldset')); }
public function __construct($options = null) { $galleryID = $options['galleryID']; $imageSrc = $options['imageSrc']; $isNewImage = $options['isNewImage']; if ($galleryID) { $this->_addSubmitSaveClose = true; } parent::__construct($options); // show online $showOnline = new Zend_Form_Element_Checkbox('G_Online'); $showOnline->setValue(1); $showOnline->setLabel($this->getView()->getCibleText('form_label_showOnline')); $showOnline->setDecorators(array('ViewHelper', array('label', array('placement' => 'append')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'label_after_checkbox')))); $this->addElement($showOnline); // gallery position $position = new Zend_Form_Element_Text('G_Position'); $position->setLabel($this->getView()->getCibleText('form_label_position')); $position->setRequired(true); $position->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->getView()->getCibleText('validation_message_empty_field')))); $position->addValidator('Int', true, array('messages' => array('notInt' => $this->getView()->getCibleText('validation_message_int_field')))); $this->addElement($position); // default gallery image $imageTmp = new Zend_Form_Element_Hidden('ImageSrc_tmp'); $imageTmp->setDecorators(array('ViewHelper', array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'openOnly' => true)))); $this->addElement($imageTmp); // hidden specify if new image for the gallery $newImage = new Zend_Form_Element_Hidden('isNewImage', array('value' => $isNewImage)); $newImage->setDecorators(array('ViewHelper')); $this->addElement($newImage); $imageOrg = new Zend_Form_Element_Hidden('ImageSrc_original'); $imageOrg->setDecorators(array('ViewHelper', array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'closeOnly' => true)))); $this->addElement($imageOrg); $imageView = new Zend_Form_Element_Image('ImageSrc_preview', array('onclick' => 'return false;')); $imageView->setImage($imageSrc); $imageView->removeDecorator('label'); $this->addElement($imageView); $imagePicker = new Cible_Form_Element_ImageGalleryPicker('ImageSrc', array('associatedElement' => 'imageView', 'galleryID' => $galleryID)); $imagePicker->removeDecorator('Label'); $this->addElement($imagePicker); $blockCategory = new Zend_Form_Element_Select('G_CategoryID'); $blockCategory->setLabel('Catégorie de cette galerie')->setAttrib('class', 'largeSelect')->setOrder(5); $categories = new Categories(); $select = $categories->select()->setIntegrityCheck(false)->from('Categories')->join('CategoriesIndex', 'C_ID = CI_CategoryID')->where('C_ModuleID = ?', 9)->where('CI_LanguageID = ?', Zend_Registry::get("languageID"))->order('CI_Title'); $categoriesArray = $categories->fetchAll($select); foreach ($categoriesArray as $category) { $blockCategory->addMultiOption($category['C_ID'], $category['CI_Title']); } $gall = new Categories(); $select = $gall->select()->setIntegrityCheck(false)->from('Galleries')->where('G_ID = ?', $galleryID); $gallArray = $gall->fetchAll($select); $blockCategory->setValue($gallArray[0]['G_CategoryID']); $this->addElement($blockCategory); // Title $title = new Zend_Form_Element_Text('GI_Title'); $title->setLabel($this->getView()->getCibleText('form_label_title'))->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->getView()->getCibleText('validation_message_empty_field'))))->setAttrib('class', 'stdTextInput'); $this->addElement($title); // $description = new Zend_Form_Element_Text('GI_Description'); // $description->setLabel($this->getView()->getCibleText('form_label_description')) // ->setRequired(false); // Description $description = new Cible_Form_Element_Editor('GI_Description', array('mode' => Cible_Form_Element_Editor::ADVANCED)); $description->setLabel($this->getView()->getCibleText('form_label_description'))->setAttrib('class', 'mediumEditor'); $this->addElement($description); }