当前位置: 首页>>代码示例>>PHP>>正文


PHP Form::exportValue方法代码示例

本文整理汇总了PHP中Form::exportValue方法的典型用法代码示例。如果您正苦于以下问题:PHP Form::exportValue方法的具体用法?PHP Form::exportValue怎么用?PHP Form::exportValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Form的用法示例。


在下文中一共展示了Form::exportValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getRegisterForm

 public function getRegisterForm($target = '/Vote/register')
 {
     $form = new Form('group_register', 'POST', $target, '', array('class' => 'admin'));
     $form->addElement('text', 'first_name', 'First Name');
     $form->addElement('text', 'last_name', 'Last Name');
     $form->addElement('text', 'company', 'Company/Group');
     $form->addElement('text', 'email', 'E-mail');
     $form->addElement('text', 'phone', 'Work Phone');
     $form->addElement('text', 'cell_phone', 'Cell Phone');
     $form->addElement('submit', 'register_submit', 'Submit');
     $form->addRule('first_name', 'Please enter your first name', 'required');
     $form->addRule('last_name', 'Please enter your last name', 'required');
     $form->addRule('company', 'Please enter your company/group', 'required');
     $form->addRule('email', 'Please enter your e-mail address', 'required');
     $form->addRule('email', 'Please enter a valid email address', 'email');
     $form->addRule('phone', 'Please enter your phone number', 'required');
     if ($form->validate() && $form->isSubmitted() && isset($_REQUEST['register_submit'])) {
         $body = "New registration request: \n\n";
         $body .= "Name: " . $form->exportValue('last_name') . ', ' . $form->exportValue('first_name');
         $body .= "\nCompany/Group: " . $form->exportValue('company');
         $body .= "\nE-mail address: " . $form->exportValue('email');
         $body .= "\nPhone number(s): Work - " . $form->exportValue('phone') . ', Cell - ' . $form->exportValue('cell_phone');
         $body .= "\n\nRequest sent on " . date("w F jS \\a\\t g:ia");
         mail('register@safeballot.com', 'Safeballot: New Request', $body, 'From: no-reply@safeballot.com');
     }
     return $form;
 }
开发者ID:swat30,项目名称:safeballot,代码行数:27,代码来源:CampaignRegister.php

示例2: getAddEditForm

 /**
  * Get an Add/Edit form for the object.
  *
  * @param string $target Post target for form submission
  */
 public function getAddEditForm($target = '/admin/Templates')
 {
     $form = new Form('Templates_addedit', 'post', $target);
     $form->setConstants(array('section' => 'addedit'));
     $form->addElement('hidden', 'section');
     if (!is_null($this->getId())) {
         $form->setConstants(array('templates_id' => $this->getId()));
         $form->addElement('hidden', 'templates_id');
         $defaultValues['templates_module'] = $this->getModule();
         $defaultValues['templates_path'] = $this->getPath();
         $defaultValues['templates_data'] = $this->getData();
         $defaultValues['templates_timestamp'] = $this->getTimestamp();
         $form->setDefaults($defaultValues);
     }
     $form->addElement('text', 'templates_module', 'module');
     $form->addElement('text', 'templates_path', 'path');
     $form->addElement('text', 'templates_data', 'data');
     $form->addElement('text', 'templates_timestamp', 'timestamp');
     $form->addElement('submit', 'templates_submit', 'Submit');
     if ($form->validate() && $form->isSubmitted()) {
         $this->setModule($form->exportValue('templates_module'));
         $this->setPath($form->exportValue('templates_path'));
         $this->setData($form->exportValue('templates_data'));
         $this->setTimestamp($form->exportValue('templates_timestamp'));
         $this->save();
     }
     return $form;
 }
开发者ID:swat30,项目名称:safeballot,代码行数:33,代码来源:Template.php

示例3: getAddEditForm

 /**
  * Get an Add/Edit form for the object.
  *
  * @param string $target Post target for form submission
  */
 public function getAddEditForm($target = '/admin/Cart')
 {
     $form = new Form('CartTaxClass_addedit', 'post', $target);
     $form->setConstants(array('section' => 'tax_classes'));
     $form->addElement('hidden', 'section');
     $form->setConstants(array('action' => 'addedit'));
     $form->addElement('hidden', 'action');
     if (!is_null($this->getId())) {
         $form->setConstants(array('carttaxclass_tax_class_id' => $this->getId()));
         $form->addElement('hidden', 'carttaxclass_tax_class_id');
         $defaultValues['carttaxclass_title'] = $this->getTitle();
         $defaultValues['carttaxclass_description'] = $this->getDescription();
         $defaultValues['carttaxclass_last_modified'] = $this->getLast_modified();
         $defaultValues['carttaxclass_date_added'] = $this->getDate_added();
         $form->setDefaults($defaultValues);
     }
     $form->addElement('text', 'carttaxclass_title', 'Title');
     $text = $form->addElement('textarea', 'carttaxclass_description', 'Description');
     $text->setCols(60);
     $text->setRows(10);
     $form->addElement('text', 'carttaxclass_last_modified', 'Last Modified');
     $form->addElement('text', 'carttaxclass_date_added', 'Date Added');
     $form->addElement('submit', 'carttaxclass_submit', 'Submit');
     $form->addRule('carttaxclass_title', 'Please enter a Title', 'required', null);
     $form->addRule('carttaxclass_description', 'Please enter a Description', 'required', null);
     if ($form->validate() && $form->isSubmitted()) {
         $this->setTitle($form->exportValue('carttaxclass_title'));
         $this->setDescription($form->exportValue('carttaxclass_description'));
         $this->setLast_modified($form->exportValue('carttaxclass_last_modified'));
         $this->setDate_added($form->exportValue('carttaxclass_date_added'));
         $this->save();
     }
     return $form;
 }
开发者ID:anas,项目名称:feedstore,代码行数:39,代码来源:CartTaxClass.php

示例4: getAddEditForm

 /**
  * Get an Add/Edit form for the object.
  *
  * @param string $target Post target for form submission
  */
 public function getAddEditForm($target = '/admin/Cart')
 {
     $form = new Form('CartProductOption_addedit', 'post', $target);
     $form->setConstants(array('section' => 'attributes'));
     $form->addElement('hidden', 'section');
     $form->setConstants(array('action' => 'addedit'));
     $form->addElement('hidden', 'action');
     if (!is_null($this->getId())) {
         $form->setConstants(array('cartproductoption_id' => $this->getId()));
         $form->addElement('hidden', 'cartproductoption_id');
         $defaultValues['cartproductoption_language_id'] = $this->getLanguageId();
         $defaultValues['cartproductoption_name'] = $this->getName();
         $defaultValues['cartproductoption_sort'] = $this->getSort();
         $defaultValues['cartproductoption_type'] = $this->getType();
         $defaultValues['cartproductoption_length'] = $this->getLength();
         $defaultValues['cartproductoption_comment'] = $this->getComment();
         $defaultValues['cartproductoption_size'] = $this->getSize();
         $defaultValues['cartproductoption_imagesPerRow'] = $this->getImagesPerRow();
         $defaultValues['cartproductoption_imagesStyle'] = $this->getImagesStyle();
         $defaultValues['cartproductoption_rows'] = $this->getRows();
         $form->setDefaults($defaultValues);
     }
     $form->addElement('text', 'cartproductoption_name', 'Name');
     $form->addElement('text', 'cartproductoption_comment', 'Comment');
     $form->addElement('submit', 'cartproductoption_submit', 'Submit');
     if ($form->validate() && $form->isSubmitted() && isset($_REQUEST['cartproductoption_submit'])) {
         $this->setName($form->exportValue('cartproductoption_name'));
         $this->setComment($form->exportValue('cartproductoption_comment'));
         $this->save();
     }
     return $form;
 }
开发者ID:anas,项目名称:feedstore,代码行数:37,代码来源:CartProductOption.php

示例5: getAddEditForm

 /**
  * Get an Add/Edit form for the object.
  *
  * @param string $target Post target for form submission
  */
 public function getAddEditForm($target = '/admin/Mail')
 {
     $form = new Form('MailUser_addedit', 'post', $target);
     $form->setConstants(array('section' => 'users'));
     $form->addElement('hidden', 'section');
     $form->setConstants(array('action' => 'addedit'));
     $form->addElement('hidden', 'action');
     if (!is_null($this->getId())) {
         $form->setConstants(array('mailuser_id' => $this->getId()));
         $form->addElement('hidden', 'mailuser_id');
         $defaultValues['mailuser_email'] = $this->getEmail();
         $defaultValues['mailuser_firstName'] = $this->getFirstName();
         $defaultValues['mailuser_lastName'] = $this->getLastName();
         $defaultValues['mailuser_notes'] = $this->getNotes();
         $form->setDefaults($defaultValues);
     }
     $form->addElement('text', 'mailuser_email', 'E-Mail Address');
     $form->addElement('text', 'mailuser_firstName', 'First Name');
     $form->addElement('text', 'mailuser_lastName', 'Last Name');
     $form->addElement('tinymce', 'mailuser_notes', 'Notes');
     $form->addElement('submit', 'mailuser_submit', 'Save');
     if ($form->validate() && $form->isSubmitted()) {
         $this->setEmail($form->exportValue('mailuser_email'));
         $this->setFirstName($form->exportValue('mailuser_firstName'));
         $this->setLastName($form->exportValue('mailuser_lastName'));
         $this->setNotes($form->exportValue('mailuser_notes'));
         $this->save();
     }
     return $form;
 }
开发者ID:anas,项目名称:feedstore,代码行数:35,代码来源:MailUser.php

示例6: getAddEditForm

 /**
  * Get an Add/Edit form for the object.
  *
  * @param string $target Post target for form submission
  */
 public function getAddEditForm($target = '/admin/CartBasketAttribute')
 {
     $form = new Form('CartBasketAttribute_addedit', 'post', $target);
     $form->setConstants(array('section' => 'addedit'));
     $form->addElement('hidden', 'section');
     if (!is_null($this->getId())) {
         $form->setConstants(array('cartbasketattribute_customers_basket_attributes_id' => $this->getId()));
         $form->addElement('hidden', 'cartbasketattribute_customers_basket_attributes_id');
         $defaultValues['cartbasketattribute_user'] = $this->getUser()->getId();
         $defaultValues['cartbasketattribute_product'] = $this->getProduct();
         $defaultValues['cartbasketattribute_optionsId'] = $this->getOptionsId();
         $defaultValues['cartbasketattribute_valueId'] = $this->getValueId();
         $defaultValues['cartbasketattribute_valueText'] = $this->getValueText();
         $defaultValues['cartbasketattribute_sort'] = $this->getSort();
         $form->setDefaults($defaultValues);
     }
     $form->addElement('text', 'cartbasketattribute_user', 'user');
     $form->addElement('text', 'cartbasketattribute_product', 'product');
     $form->addElement('text', 'cartbasketattribute_optionsId', 'optionsId');
     $form->addElement('text', 'cartbasketattribute_valueId', 'valueId');
     $form->addElement('text', 'cartbasketattribute_valueText', 'valueText');
     $form->addElement('text', 'cartbasketattribute_sort', 'sort');
     $form->addElement('submit', 'cartbasketattribute_submit', 'Submit');
     if ($form->validate() && $form->isSubmitted()) {
         $this->setUser($form->exportValue('cartbasketattribute_user'));
         $this->setProduct($form->exportValue('cartbasketattribute_product'));
         $this->setOptionsId($form->exportValue('cartbasketattribute_optionsId'));
         $this->setValueId($form->exportValue('cartbasketattribute_valueId'));
         $this->setValueText($form->exportValue('cartbasketattribute_valueText'));
         $this->setSort($form->exportValue('cartbasketattribute_sort'));
         $this->save();
     }
     return $form;
 }
开发者ID:anas,项目名称:feedstore,代码行数:39,代码来源:CartBasketAttribute.php

示例7: getAddEditForm

 public function getAddEditForm($target = '/admin/Campaigns&section=addedit')
 {
     $form = new Form('campaign_addedit', 'POST', $target, '', array('class' => 'admin', 'onsubmit' => 'disableSubmit(this);'));
     $form->addElement('text', 'name', 'Name');
     $form->addElement('select', 'auto_send', 'Auto-reminder on start', array(0 => 'Disable', 1 => 'Enable'));
     $date[] = $form->createElement('date', 'start_date', 'Start Date', array('format' => 'd F Y - H : i', 'addEmptyOption' => 'true', 'emptyOptionValue' => '', 'emptyOptionText' => 'Select', 'minYear' => date('Y'), 'maxYear' => date('Y') + 3), array('onchange' => 'return !updateEndDate(this)'));
     $date[] = $form->createElement('date', 'end_date', 'End Date', array('format' => 'd F Y - H : i', 'addEmptyOption' => 'true', 'emptyOptionValue' => '', 'emptyOptionText' => 'Select', 'minYear' => date('Y'), 'maxYear' => date('Y') + 5));
     $form->addElement($date[0]);
     $form->addElement($date[1]);
     $form->addElement('tinymce', 'description', 'Description');
     $form->addElement('submit', 'submit', 'Submit');
     if (!is_null($this->id)) {
         $form->setConstants(array('campaign_id' => $this->getId()));
         $form->addElement('hidden', 'campaign_id');
         $defaultValues['name'] = $this->getName();
         $defaultValues['start_date'] = $this->getStartDate();
         $defaultValues['end_date'] = $this->getEndDate();
         $defaultValues['description'] = $this->getDescription();
         $defaultValues['auto_send'] = $this->getAutoSend();
         $form->setDefaults($defaultValues);
     }
     $form->registerRule('validDate', 'function', 'validDates', $this);
     //ValidDate...  get it?
     $form->addRule(array('start_date', 'end_date'), 'Please make sure that the event has a positive length and that it begins after the current date/time', 'validDate');
     $form->addRule('name', 'Please enter a campaign name', 'required');
     if ($form->isSubmitted() && isset($_POST['submit'])) {
         if ($form->validate()) {
             $this->setName($form->exportValue('name'));
             $this->setGroup($_SESSION['authenticated_user']->getAuthGroup());
             $this->setDescription($form->exportValue('description'));
             $this->setStartDate($this->formatDate($form->exportValue('start_date')));
             $this->setEndDate($this->formatDate($form->exportValue('end_date')));
             $this->setStatus($this->calcStatus());
             $this->setAutoSend($form->exportValue('auto_send'));
             $this->save();
         }
     }
     return $form;
 }
开发者ID:swat30,项目名称:safeballot,代码行数:39,代码来源:Campaign.php

示例8: getAddEditForm

 /**
  * Get an Add/Edit form for the object.
  *
  * @param string $target Post target for form submission
  */
 public function getAddEditForm($target = '/admin/Cart')
 {
     $form = new Form('CartManufacturer_addedit', 'post', $target);
     $form->setConstants(array('section' => 'manufacturers'));
     $form->addElement('hidden', 'section');
     $form->setConstants(array('action' => 'addedit'));
     $form->addElement('hidden', 'action');
     if (!is_null($this->getId())) {
         $form->setConstants(array('cartmanufacturer_manufacturers_id' => $this->getId()));
         $form->addElement('hidden', 'cartmanufacturer_manufacturers_id');
         $defaultValues['cartmanufacturer_name'] = $this->getName();
         $defaultValues['cartmanufacturer_image'] = $this->getImage()->getId();
         //$defaultValues ['cartmanufacturer_date_added'] = $this->getDate_added();
         //$defaultValues ['cartmanufacturer_last_modified'] = $this->getLast_modified();
         $form->setDefaults($defaultValues);
     }
     if (@$this->getImage() && @$this->getImage()->getId()) {
         $form->addElement('dbimage', 'cartmanufacturer_image', $this->getImage()->getId());
     }
     $form->addElement('text', 'cartmanufacturer_name', 'Name');
     $newImage = $form->addElement('file', 'cartmanufacturer_image_upload', 'Image');
     //$form->addElement('text', 'cartmanufacturer_date_added', 'date_added');
     //$form->addElement('text', 'cartmanufacturer_last_modified', 'last_modified');
     $form->addElement('submit', 'cartmanufacturer_submit', 'Submit');
     if ($form->validate() && $form->isSubmitted() && isset($_REQUEST['cartmanufacturer_submit'])) {
         $this->setName($form->exportValue('cartmanufacturer_name'));
         $this->setDescription($form->exportValue('cartmanufacturer_description'));
         //$this->setImage($form->exportValue('cartmanufacturer_image'));
         //$this->setDate_added($form->exportValue('cartmanufacturer_date_added'));
         //$this->setLast_modified($form->exportValue('cartmanufacturer_last_modified'));
         if ($newImage->isUploadedFile()) {
             $im = new Image();
             $id = $im->insert($newImage->getValue());
             $this->setImage($id);
         }
         $this->save();
     }
     return $form;
 }
开发者ID:anas,项目名称:feedstore,代码行数:44,代码来源:CartManufacturer.php

示例9: getAddEditForm

 /**
  * Get an Add/Edit form for the object.
  *
  * @param string $target Post target for form submission
  */
 public function getAddEditForm($target = '/admin/MailSendOut')
 {
     $form = new Form('MailSendOut_addedit', 'post', $target);
     $form->setConstants(array('section' => 'addedit'));
     $form->addElement('hidden', 'section');
     if (!is_null($this->getId())) {
         $form->setConstants(array('mailsendout_mso_id' => $this->getId()));
         $form->addElement('hidden', 'mailsendout_mso_id');
         $defaultValues['mailsendout_timestamp'] = $this->getTimestamp();
         $defaultValues['mailsendout_subject'] = $this->getSubject();
         $defaultValues['mailsendout_content'] = $this->getContent();
         $defaultValues['mailsendout_fromName'] = $this->getFromName();
         $defaultValues['mailsendout_fromAddress'] = $this->getFromAddress();
         $form->setDefaults($defaultValues);
     }
     $form->addElement('text', 'mailsendout_timestamp', 'timestamp');
     $form->addElement('text', 'mailsendout_subject', 'subject');
     $form->addElement('text', 'mailsendout_content', 'content');
     $form->addElement('text', 'mailsendout_fromName', 'fromName');
     $form->addElement('text', 'mailsendout_fromAddress', 'fromAddress');
     $form->addElement('submit', 'mailsendout_submit', 'Submit');
     if ($form->validate() && $form->isSubmitted()) {
         $this->setTimestamp($form->exportValue('mailsendout_timestamp'));
         $this->setSubject($form->exportValue('mailsendout_subject'));
         $this->setContent($form->exportValue('mailsendout_content'));
         $this->setFromName($form->exportValue('mailsendout_fromName'));
         $this->setFromAddress($form->exportValue('mailsendout_fromAddress'));
         $this->save();
     }
     return $form;
 }
开发者ID:anas,项目名称:feedstore,代码行数:36,代码来源:MailSendOut.php

示例10: getAddEditForm

 /**
  * Get an Add/Edit form for the object.
  *
  * @param string $target Post target for form submission
  */
 public function getAddEditForm($target = '/admin/CartProductAttributes')
 {
     $form = new Form('CartProductAttributes_addedit', 'post', $target);
     $form->setConstants(array('section' => 'addedit'));
     $form->addElement('hidden', 'section');
     if (!is_null($this->getId())) {
         $form->setConstants(array('cartproductattributes_products_attributes_id' => $this->getId()));
         $form->addElement('hidden', 'cartproductattributes_products_attributes_id');
         $defaultValues['cartproductattributes_productid'] = $this->getProductid();
         $defaultValues['cartproductattributes_optionsId'] = $this->getOptionsId()->getId();
         $defaultValues['cartproductattributes_valuesId'] = $this->getValues()->getId();
         $defaultValues['cartproductattributes_valuesPrice'] = $this->getValuesPrice();
         $defaultValues['cartproductattributes_pricePrefix'] = $this->getPricePrefix();
         $defaultValues['cartproductattributes_sort'] = $this->getSort();
         $defaultValues['cartproductattributes_isFree'] = $this->getIsFree();
         $defaultValues['cartproductattributes_weight'] = $this->getWeight();
         $defaultValues['cartproductattributes_weightPrefix'] = $this->getWeightPrefix();
         $defaultValues['cartproductattributes_displayOnly'] = $this->getDisplayOnly();
         $defaultValues['cartproductattributes_default'] = $this->getDefault();
         $defaultValues['cartproductattributes_discounted'] = $this->getDiscounted();
         $defaultValues['cartproductattributes_image'] = $this->getImage()->getId();
         $defaultValues['cartproductattributes_priceBaseIncluded'] = $this->getPriceBaseIncluded();
         $defaultValues['cartproductattributes_priceOneTime'] = $this->getPriceOneTime();
         $defaultValues['cartproductattributes_priceFactor'] = $this->getPriceFactor();
         $defaultValues['cartproductattributes_priceFactorOffset'] = $this->getPriceFactorOffset();
         $defaultValues['cartproductattributes_priceFactorOnetime'] = $this->getPriceFactorOnetime();
         $defaultValues['cartproductattributes_priceFactorOnetimeOffset'] = $this->getPriceFactorOnetimeOffset();
         $defaultValues['cartproductattributes_qtyPrices'] = $this->getQtyPrices();
         $defaultValues['cartproductattributes_qtyPricesOneTime'] = $this->getQtyPricesOneTime();
         $defaultValues['cartproductattributes_priceWords'] = $this->getPriceWords();
         $defaultValues['cartproductattributes_priceWordsFree'] = $this->getPriceWordsFree();
         $defaultValues['cartproductattributes_priceLetters'] = $this->getPriceLetters();
         $defaultValues['cartproductattributes_priceLettersFree'] = $this->getPriceLettersFree();
         $defaultValues['cartproductattributes_required'] = $this->getRequired();
         $defaultValues['cartproductattributes_quantity'] = $this->getInventory();
         $form->setDefaults($defaultValues);
     }
     $form->addElement('text', 'cartproductattributes_productid', 'productid');
     $form->addElement('text', 'cartproductattributes_optionsId', 'optionsId');
     $form->addElement('text', 'cartproductattributes_valuesId', 'valuesId');
     $form->addElement('text', 'cartproductattributes_valuesPrice', 'valuesPrice');
     $form->addElement('text', 'cartproductattributes_pricePrefix', 'pricePrefix');
     $form->addElement('text', 'cartproductattributes_sort', 'sort');
     $form->addElement('text', 'cartproductattributes_isFree', 'isFree');
     $form->addElement('text', 'cartproductattributes_weight', 'weight');
     $form->addElement('text', 'cartproductattributes_weightPrefix', 'weightPrefix');
     $form->addElement('text', 'cartproductattributes_displayOnly', 'displayOnly');
     $form->addElement('text', 'cartproductattributes_default', 'default');
     $form->addElement('text', 'cartproductattributes_discounted', 'discounted');
     $form->addElement('text', 'cartproductattributes_image', 'image');
     $form->addElement('text', 'cartproductattributes_priceBaseIncluded', 'priceBaseIncluded');
     $form->addElement('text', 'cartproductattributes_priceOneTime', 'priceOneTime');
     $form->addElement('text', 'cartproductattributes_priceFactor', 'priceFactor');
     $form->addElement('text', 'cartproductattributes_priceFactorOffset', 'priceFactorOffset');
     $form->addElement('text', 'cartproductattributes_priceFactorOnetime', 'priceFactorOnetime');
     $form->addElement('text', 'cartproductattributes_priceFactorOnetimeOffset', 'priceFactorOnetimeOffset');
     $form->addElement('text', 'cartproductattributes_qtyPrices', 'qtyPrices');
     $form->addElement('text', 'cartproductattributes_qtyPricesOneTime', 'qtyPricesOneTime');
     $form->addElement('text', 'cartproductattributes_priceWords', 'priceWords');
     $form->addElement('text', 'cartproductattributes_priceWordsFree', 'priceWordsFree');
     $form->addElement('text', 'cartproductattributes_priceLetters', 'priceLetters');
     $form->addElement('text', 'cartproductattributes_priceLettersFree', 'priceLettersFree');
     $form->addElement('text', 'cartproductattributes_required', 'required');
     $form->addElement('submit', 'cartproductattributes_submit', 'Submit');
     if ($form->validate() && $form->isSubmitted()) {
         $this->setProductid($form->exportValue('cartproductattributes_productid'));
         $this->setOptionsId($form->exportValue('cartproductattributes_optionsId'));
         $this->setValue($form->exportValue('cartproductattributes_valuesId'));
         $this->setValuesPrice($form->exportValue('cartproductattributes_valuesPrice'));
         $this->setPricePrefix($form->exportValue('cartproductattributes_pricePrefix'));
         $this->setSort($form->exportValue('cartproductattributes_sort'));
         $this->setIsFree($form->exportValue('cartproductattributes_isFree'));
         $this->setWeight($form->exportValue('cartproductattributes_weight'));
         $this->setWeightPrefix($form->exportValue('cartproductattributes_weightPrefix'));
         $this->setDisplayOnly($form->exportValue('cartproductattributes_displayOnly'));
         $this->setDefault($form->exportValue('cartproductattributes_default'));
         $this->setDiscounted($form->exportValue('cartproductattributes_discounted'));
         $this->setImage($form->exportValue('cartproductattributes_image'));
         $this->setPriceBaseIncluded($form->exportValue('cartproductattributes_priceBaseIncluded'));
         $this->setPriceOneTime($form->exportValue('cartproductattributes_priceOneTime'));
         $this->setPriceFactor($form->exportValue('cartproductattributes_priceFactor'));
         $this->setPriceFactorOffset($form->exportValue('cartproductattributes_priceFactorOffset'));
         $this->setPriceFactorOnetime($form->exportValue('cartproductattributes_priceFactorOnetime'));
         $this->setPriceFactorOnetimeOffset($form->exportValue('cartproductattributes_priceFactorOnetimeOffset'));
         $this->setQtyPrices($form->exportValue('cartproductattributes_qtyPrices'));
         $this->setQtyPricesOneTime($form->exportValue('cartproductattributes_qtyPricesOneTime'));
         $this->setPriceWords($form->exportValue('cartproductattributes_priceWords'));
         $this->setPriceWordsFree($form->exportValue('cartproductattributes_priceWordsFree'));
         $this->setPriceLetters($form->exportValue('cartproductattributes_priceLetters'));
         $this->setPriceLettersFree($form->exportValue('cartproductattributes_priceLettersFree'));
         $this->setRequired($form->exportValue('cartproductattributes_required'));
         $this->save();
     }
     return $form;
 }
开发者ID:anas,项目名称:feedstore,代码行数:100,代码来源:CartProductAttribute.php

示例11: getAddEditForm

 /**
  * Get an Add/Edit form for the object.
  *
  * @param string $target Post target for form submission
  */
 public function getAddEditForm($target = '/admin/CartOrderStatusHistory')
 {
     $form = new Form('CartOrderStatusHistory_addedit', 'post', $target);
     $form->setConstants(array('section' => 'addedit'));
     $form->addElement('hidden', 'section');
     if (!is_null($this->getId())) {
         $form->setConstants(array('cartorderstatushistory_orders_status_history_id' => $this->getId()));
         $form->addElement('hidden', 'cartorderstatushistory_orders_status_history_id');
         $defaultValues['cartorderstatushistory_orderId'] = $this->getOrderId();
         $defaultValues['cartorderstatushistory_status'] = $this->getStatus()->getId();
         $defaultValues['cartorderstatushistory_date_added'] = $this->getDate_added();
         $defaultValues['cartorderstatushistory_customer_notified'] = $this->getCustomer_notified();
         $defaultValues['cartorderstatushistory_comments'] = $this->getComments();
         $form->setDefaults($defaultValues);
     }
     $form->addElement('text', 'cartorderstatushistory_orderId', 'orderId');
     $form->addElement('text', 'cartorderstatushistory_status', 'status');
     $form->addElement('text', 'cartorderstatushistory_date_added', 'date_added');
     $form->addElement('text', 'cartorderstatushistory_customer_notified', 'customer_notified');
     $form->addElement('text', 'cartorderstatushistory_comments', 'comments');
     $form->addElement('submit', 'cartorderstatushistory_submit', 'Submit');
     if ($form->validate() && $form->isSubmitted()) {
         $this->setOrderId($form->exportValue('cartorderstatushistory_orderId'));
         $this->setStatus($form->exportValue('cartorderstatushistory_status'));
         $this->setDate_added($form->exportValue('cartorderstatushistory_date_added'));
         $this->setCustomer_notified($form->exportValue('cartorderstatushistory_customer_notified'));
         $this->setComments($form->exportValue('cartorderstatushistory_comments'));
         $this->save();
     }
     return $form;
 }
开发者ID:anas,项目名称:feedstore,代码行数:36,代码来源:CartOrderStatusHistory.php

示例12: getAddEditForm

 /**
  * Get an Add/Edit form for the object.
  *
  * @param string $target Post target for form submission
  */
 public function getAddEditForm($target = '/admin/CartBasket')
 {
     $form = new Form('CartBasket_addedit', 'post', $target);
     $form->setConstants(array('section' => 'addedit'));
     $form->addElement('hidden', 'section');
     if (!is_null($this->getId())) {
         $form->setConstants(array('cartbasket_customers_basket_id' => $this->getId()));
         $form->addElement('hidden', 'cartbasket_customers_basket_id');
         $defaultValues['cartbasket_user'] = $this->getUser()->getId();
         $defaultValues['cartbasket_product'] = $this->getProduct();
         $defaultValues['cartbasket_quantity'] = $this->getQuantity();
         $defaultValues['cartbasket_price'] = $this->getPrice();
         $defaultValues['cartbasket_date'] = $this->getDate();
         $form->setDefaults($defaultValues);
     }
     $form->addElement('text', 'cartbasket_user', 'user');
     $form->addElement('text', 'cartbasket_product', 'product');
     $form->addElement('text', 'cartbasket_quantity', 'quantity');
     $form->addElement('text', 'cartbasket_price', 'price');
     $form->addElement('text', 'cartbasket_date', 'date');
     $form->addElement('submit', 'cartbasket_submit', 'Submit');
     if ($form->validate() && $form->isSubmitted()) {
         $this->setUser($form->exportValue('cartbasket_user'));
         $this->setProduct($form->exportValue('cartbasket_product'));
         $this->setQuantity($form->exportValue('cartbasket_quantity'));
         $this->setPrice($form->exportValue('cartbasket_price'));
         $this->setDate($form->exportValue('cartbasket_date'));
         $this->save();
     }
     return $form;
 }
开发者ID:anas,项目名称:feedstore,代码行数:36,代码来源:CartBasket.php

示例13: getAddEditForm

 /**
  * Get an Add/Edit form for the object.
  *
  * @param string $target Post target for form submission
  */
 public function getAddEditForm($target = '/admin/Mail')
 {
     $form = new Form('MailList_addedit', 'post', $target);
     $form->setConstants(array('section' => 'lists'));
     $form->addElement('hidden', 'section');
     $form->setConstants(array('action' => 'addedit'));
     $form->addElement('hidden', 'action');
     if (!is_null($this->getId())) {
         $form->setConstants(array('maillist_id' => $this->getId()));
         $form->addElement('hidden', 'maillist_id');
         $defaultValues['maillist_name'] = $this->getName();
         $form->setDefaults($defaultValues);
     }
     $form->addElement('text', 'maillist_name', 'List Name');
     $form->addElement('submit', 'maillist_submit', 'Submit');
     if ($form->validate() && $form->isSubmitted()) {
         $this->setName($form->exportValue('maillist_name'));
         $this->save();
     }
     return $form;
 }
开发者ID:anas,项目名称:feedstore,代码行数:26,代码来源:MailList.php

示例14: getAddEditForm


//.........这里部分代码省略.........
     $form->addElement('text', 'cartorder_delivery_state', 'delivery_state');
     $form->addElement('text', 'cartorder_delivery_country', 'delivery_country');
     $form->addElement('text', 'cartorder_delivery_address_format_id', 'delivery_address_format_id');
     $form->addElement('text', 'cartorder_billingName', 'billingName');
     $form->addElement('text', 'cartorder_billingCompany', 'billingCompany');
     $form->addElement('text', 'cartorder_billingAddress', 'billingAddress');
     $form->addElement('text', 'cartorder_billing_suburb', 'billing_suburb');
     $form->addElement('text', 'cartorder_billing_city', 'billing_city');
     $form->addElement('text', 'cartorder_billing_postcode', 'billing_postcode');
     $form->addElement('text', 'cartorder_billing_state', 'billing_state');
     $form->addElement('text', 'cartorder_billing_country', 'billing_country');
     $form->addElement('text', 'cartorder_billing_address_format_id', 'billing_address_format_id');
     $form->addElement('text', 'cartorder_paymentMethod', 'paymentMethod');
     $form->addElement('text', 'cartorder_paymentModuleCode', 'paymentModuleCode');
     $form->addElement('text', 'cartorder_shippingMethod', 'shippingMethod');
     $form->addElement('text', 'cartorder_shippingModuleCode', 'shippingModuleCode');
     $form->addElement('text', 'cartorder_couponCode', 'couponCode');
     $form->addElement('text', 'cartorder_cc_type', 'cc_type');
     $form->addElement('text', 'cartorder_cc_owner', 'cc_owner');
     $form->addElement('text', 'cartorder_cc_number', 'cc_number');
     $form->addElement('text', 'cartorder_cc_expires', 'cc_expires');
     $form->addElement('text', 'cartorder_cc_cvv', 'cc_cvv');
     $form->addElement('text', 'cartorder_last_modified', 'last_modified');
     $form->addElement('text', 'cartorder_date_purchased', 'date_purchased');
     */
     $form->addElement('select', 'cartorder_status', 'Order Status', self::getStatusArray());
     $form->addElement('textarea', 'cartorder_statuscomment', 'Comment');
     /*
     		$form->addElement('text', 'cartorder_date_finished', 'date_finished');
     		$form->addElement('text', 'cartorder_currency', 'currency');
     		$form->addElement('text', 'cartorder_currencyValue', 'currencyValue');
     		$form->addElement('text', 'cartorder_total', 'total');
     		$form->addElement('text', 'cartorder_tax', 'tax');
     		$form->addElement('text', 'cartorder_paypal_ipn_id', 'paypal_ipn_id');
     		$form->addElement('text', 'cartorder_ip_address', 'ip_address'); */
     $form->addElement('submit', 'cartorder_submit', 'Submit');
     if ($form->validate() && $form->isSubmitted() && isset($_REQUEST['cartorder_submit'])) {
         /*
         			$this->setCustomer($form->exportValue('cartorder_customer'));
         			$this->setCustomerName($form->exportValue('cartorder_customerName'));
         			$this->setCustomerCompany($form->exportValue('cartorder_customerCompany'));
         			$this->setCustomerAddress($form->exportValue('cartorder_customerAddress'));
         			$this->setCustomers_suburb($form->exportValue('cartorder_customers_suburb'));
         			$this->setCustomers_city($form->exportValue('cartorder_customers_city'));
         			$this->setCustomers_postcode($form->exportValue('cartorder_customers_postcode'));
         			$this->setCustomers_state($form->exportValue('cartorder_customers_state'));
         			$this->setCustomers_country($form->exportValue('cartorder_customers_country'));
         			$this->setCustomerTelephone($form->exportValue('cartorder_customerTelephone'));
         			$this->setCustomerEmail($form->exportValue('cartorder_customerEmail'));
         			$this->setCustomers_address_format_id($form->exportValue('cartorder_customers_address_format_id'));
         			$this->setDeliveryName($form->exportValue('cartorder_deliveryName'));
         			$this->setDeliveryCompany($form->exportValue('cartorder_deliveryCompany'));
         			$this->setDeliveryAddress($form->exportValue('cartorder_deliveryAddress'));
         			$this->setDelivery_suburb($form->exportValue('cartorder_delivery_suburb'));
         			$this->setDelivery_city($form->exportValue('cartorder_delivery_city'));
         			$this->setDelivery_postcode($form->exportValue('cartorder_delivery_postcode'));
         			$this->setDelivery_state($form->exportValue('cartorder_delivery_state'));
         			$this->setDelivery_country($form->exportValue('cartorder_delivery_country'));
         			$this->setDelivery_address_format_id($form->exportValue('cartorder_delivery_address_format_id'));
         			$this->setBillingName($form->exportValue('cartorder_billingName'));
         			$this->setBillingCompany($form->exportValue('cartorder_billingCompany'));
         			$this->setBillingAddress($form->exportValue('cartorder_billingAddress'));
         			$this->setBilling_suburb($form->exportValue('cartorder_billing_suburb'));
         			$this->setBilling_city($form->exportValue('cartorder_billing_city'));
         			$this->setBilling_postcode($form->exportValue('cartorder_billing_postcode'));
         			$this->setBilling_state($form->exportValue('cartorder_billing_state'));
         			$this->setBilling_country($form->exportValue('cartorder_billing_country'));
         			$this->setBilling_address_format_id($form->exportValue('cartorder_billing_address_format_id'));
         			$this->setPaymentMethod($form->exportValue('cartorder_paymentMethod'));
         			$this->setPaymentModuleCode($form->exportValue('cartorder_paymentModuleCode'));
         			$this->setShippingMethod($form->exportValue('cartorder_shippingMethod'));
         			$this->setShippingModuleCode($form->exportValue('cartorder_shippingModuleCode'));
         			$this->setCouponCode($form->exportValue('cartorder_couponCode'));
         			$this->setCc_type($form->exportValue('cartorder_cc_type'));
         			$this->setCc_owner($form->exportValue('cartorder_cc_owner'));
         			$this->setCc_number($form->exportValue('cartorder_cc_number'));
         			$this->setCc_expires($form->exportValue('cartorder_cc_expires'));
         			$this->setCc_cvv($form->exportValue('cartorder_cc_cvv'));
         			$this->setLast_modified($form->exportValue('cartorder_last_modified'));
         			$this->setDate_purchased($form->exportValue('cartorder_date_purchased'));*/
         $this->setStatus($form->exportValue('cartorder_status'));
         $status_history = new CartOrderStatusHistory();
         $status_history->setCustomer_notified(1);
         $status_history->setDate_added(date('Y-m-d H:i:s'));
         $status_history->setOrderId($this->getId());
         $status_history->setStatus($form->exportValue('cartorder_status'));
         $status_history->setComments($form->exportValue('cartorder_statuscomment'));
         $status_history->save();
         /*
         			$this->setDate_finished($form->exportValue('cartorder_date_finished'));
         			$this->setCurrency($form->exportValue('cartorder_currency'));
         			$this->setCurrencyValue($form->exportValue('cartorder_currencyValue'));
         			$this->setTotal($form->exportValue('cartorder_total'));
         			$this->setTax($form->exportValue('cartorder_tax'));
         			$this->setPaypal_ipn_id($form->exportValue('cartorder_paypal_ipn_id'));
         			$this->setIp_address($form->exportValue('cartorder_ip_address')); */
         $this->save();
     }
     return $form;
 }
开发者ID:anas,项目名称:feedstore,代码行数:101,代码来源:CartOrder.php

示例15: getAddEditForm

 /**
  * Get an Add/Edit form for the object.
  *
  * @param string $target Post target for form submission
  */
 public function getAddEditForm($target = '/admin/CartProductOptionValue')
 {
     $form = new Form('CartProductOptionValue_addedit', 'post', $target);
     $form->setConstants(array('section' => 'addedit'));
     $form->addElement('hidden', 'section');
     if (!is_null($this->get())) {
         $form->setConstants(array('cartproductoptionvalue_id' => $this->getId()));
         $form->addElement('hidden', 'cartproductoptionvalue_id');
         $defaultValues['cartproductoptionvalue_language_id'] = $this->getLanguage_id();
         $defaultValues['cartproductoptionvalue_name'] = $this->getName();
         $defaultValues['cartproductoptionvalue_sort'] = $this->getSort();
         $form->setDefaults($defaultValues);
     }
     $form->addElement('text', 'cartproductoptionvalue_id', 'id');
     $form->addElement('text', 'cartproductoptionvalue_name', 'name');
     $form->addElement('text', 'cartproductoptionvalue_sort', 'sort');
     $form->addElement('submit', 'cartproductoptionvalue_submit', 'Submit');
     if ($form->validate() && $form->isSubmitted()) {
         $this->setLanguage_id($form->exportValue('cartproductoptionvalue_language_id'));
         $this->setName($form->exportValue('cartproductoptionvalue_name'));
         $this->setSort($form->exportValue('cartproductoptionvalue_sort'));
         $this->save();
     }
     return $form;
 }
开发者ID:anas,项目名称:feedstore,代码行数:30,代码来源:CartProductOptionValue.php


注:本文中的Form::exportValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。