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


PHP sfForm::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Constructor
  */
 public function __construct(Invoice $invoice)
 {
     sfContext::getInstance()->getConfiguration()->loadHelpers(array('Url', 'Date'));
     $resultUrl = 'https://' . sfContext::getInstance()->getRequest()->getHost() . url_for('payment_privat24_result');
     $defaults = array('amt' => $invoice->getAmount(), 'ccy' => 'UAH', 'merchant' => sfConfig::get('app_privat24_merchant'), 'order' => $invoice->getTransactionId(), 'details' => $invoice->getDescription(), 'pay_way' => 'privat24', 'return_url' => $resultUrl, 'server_url' => $resultUrl);
     parent::__construct($defaults);
 }
开发者ID:pycmam,项目名称:myPaymentPlugin,代码行数:10,代码来源:Privat24RequestForm.class.php

示例2: __construct

 /**
  * Constructor.
  *
  * @param opAuthAdapter $adapter  An opAuthAdapter object
  * @param array  $defaults    An array of field default values
  * @param array  $options     An array of options
  * @param string $CRFSSecret  A CSRF secret (false to disable CSRF protection, null to use the global CSRF secret)
  *
  * @see sfForm
  */
 public function __construct(opAuthAdapter $adapter, $defaults = array(), $options = array(), $CSRFSecret = null)
 {
     $this->adapter = $adapter;
     parent::__construct($defaults, $options, false);
     $this->setWidget('next_uri', new opWidgetFormInputHiddenNextUri());
     $this->setValidator('next_uri', new opValidatorNextUri());
 }
开发者ID:Kazuhiro-Murota,项目名称:OpenPNE3,代码行数:17,代码来源:sfOpenPNEAuthForm.class.php

示例3: __construct

 /**
  * Constructor.
  *
  * Notifies the 'form.post_configure' event.
  *
  * @see sfForm
  */
 public function __construct($defaults = array(), $options = array(), $CSRFSecret = null)
 {
     parent::__construct($defaults, $options, $CSRFSecret);
     if (self::$dispatcher) {
         self::$dispatcher->notify(new sfEvent($this, 'form.post_configure'));
     }
 }
开发者ID:seven07ve,项目名称:vendorepuestos,代码行数:14,代码来源:sfFormSymfony.class.php

示例4: __construct

 /**
  * Constructor
  */
 public function __construct(Invoice $invoice)
 {
     sfContext::getInstance()->getConfiguration()->loadHelpers(array('Url', 'Date'));
     $resultUrl = 'https://' . sfContext::getInstance()->getRequest()->getHost() . url_for('payment_liqpay_result');
     $defaults = array('version' => '1.1', 'merchant_id' => sfConfig::get('app_liqpay_merchant'), 'amount' => $invoice->getAmount(), 'currency' => 'UAH', 'order_id' => $invoice->getId(), 'description' => $invoice->getDescription(), 'result_url' => $resultUrl, 'server_url' => $resultUrl);
     parent::__construct($defaults);
 }
开发者ID:pycmam,项目名称:myPaymentPlugin,代码行数:10,代码来源:LiqpayRequestForm.class.php

示例5: __construct

 public function __construct($defaults = array(), $options = array(), $CSRFSecret = null)
 {
     if (!$options['fields']) {
         throw new sfException('The fields options required!');
     }
     parent::__construct($defaults, $options, $CSRFSecret);
 }
开发者ID:nova76,项目名称:nova-plugins,代码行数:7,代码来源:tfCsvForm.class.php

示例6: __construct

  /**
   * Form constructor.
   *
   * Available options:
   * - embedded_form_class: The class name of the forms to embed. Uses the model name by default.
   *                  (a form based on a collection of Book objects embeds BookForm objects)
   * - item_pattern:  The pattern used to name each embedded form. Defaults to '%index%'.
   * - add_delete:    Whether to add a delete widget for each object. Defaults to true.
   * - delete_name:   Name of the delete widget. Defaults to 'delete'.
   * - delete_widget: Optional delete widget object. If left null, uses a sfWidgetFormDelete instance.
   * - alert_text:    The text of the Javascript alert to show
   * - hide_parent:   Whether to hide the parent form when clicking the checkbox
   * - parent_level:  The number of times parentNode must be called to reach the parent to hide.
   *                  Recommended values: 6 for embedded form, 7 for merged form
   * - remove_fields: The list of fields to remove from the embedded object forms
   *
   * @param PropelCollection $collection A collection of Propel objects
   *                                     used to initialize default values
   * @param array            $options    An array of options
   * @param string           $CSRFSecret A CSRF secret (false to disable CSRF protection, null to use the global CSRF secret)
   *
   * @see sfForm
   */
  public function __construct($collection = null, $options = array(), $CSRFSecret = null)
  {
    $options = array_merge(array(
      'item_pattern'  => '%index%',
      'add_delete'    => false,
      'delete_name'   => 'delete',
      'delete_widget' => null,
      'remove_fields' => array(),
    ), $options);

    if (!$collection)
    {
      $this->model = $options['model'];
      $collection = new PropelObjectCollection();
      $collection->setModel($this->model);
      $this->collection = $collection;
    }
    else
    {
      if (!$collection instanceof PropelObjectCollection)
      {
        throw new sfException(sprintf('The "%s" form only accepts a PropelObjectCollection object.', get_class($this)));
      }
      $this->collection = $collection;
      $this->model = $collection->getModel();
    }

    $this->isEmpty = $this->getCollection()->isEmpty();

    parent::__construct(array(), $options, $CSRFSecret);
  }
开发者ID:nurhidayatullah,项目名称:inventory,代码行数:54,代码来源:sfFormPropelCollection.class.php

示例7: __construct

 public function __construct(array $info, $index)
 {
     $this->dimensions = $info['amount_of_segments'];
     parent::__construct(null, null, false);
     $this->setDefault('katuse tüüp', $index);
     $this->setDefault('katuse skeema', $info['big_picture_url']);
 }
开发者ID:vcgato29,项目名称:poff,代码行数:7,代码来源:SimpleDimensionsForm.class.php

示例8: __construct

 /**
  * Constructor
  */
 public function __construct(Invoice $invoice)
 {
     sfContext::getInstance()->getConfiguration()->loadHelpers(array('Url'));
     $defaults = array('WMI_MERCHANT_ID' => sfConfig::get('app_w1_merchant'), 'WMI_PAYMENT_AMOUNT' => sprintf('%01.2f', $invoice->getAmount()), 'WMI_CURRENCY_ID' => 980, 'WMI_PAYMENT_NO' => $invoice->getId(), 'WMI_DESCRIPTION' => $invoice->geDescription(), 'WMI_SUCCESS_URL' => url_for('payment_w1_success', array(), true), 'WMI_FAIL_URL' => url_for('payment_w1_fail', array(), true), 'WMI_PTENABLED' => 'CashTerminalUAH');
     $defaults['WMI_SIGNATURE'] = $this->createSign($defaults);
     parent::__construct($defaults);
 }
开发者ID:pycmam,项目名称:myPaymentPlugin,代码行数:10,代码来源:W1RequestForm.class.php

示例9: __construct

 public function __construct($id, $value, $soptions)
 {
     $this->id = $id;
     $this->value = $value;
     $this->soptions = $soptions;
     parent::__construct();
 }
开发者ID:verenate,项目名称:gri,代码行数:7,代码来源:aTextForm.class.php

示例10: __construct

 /**
  * Constructor
  */
 public function __construct(Invoice $invoice, array $wallets)
 {
     $this->invoice = $invoice;
     $this->wallets = $wallets;
     $defaults = array('LMI_SIM_MODE' => sfConfig::get('app_webmoney_sim_mode'), 'LMI_PAYMENT_NO' => $invoice->getId(), 'LMI_PAYMENT_DESC_BASE64' => base64_encode($invoice->getDescription()));
     parent::__construct($defaults);
 }
开发者ID:pycmam,项目名称:myPaymentPlugin,代码行数:10,代码来源:WebmoneyRequestForm.class.php

示例11: __construct

 /**
  * Constructor.
  *
  * @param sfUser A sfUser instance
  * @param array  An array of options
  * @param string A CSRF secret (false to disable CSRF protection, null to use the global CSRF secret)
  *
  * @see sfForm
  */
 public function __construct(sfUser $user, $options = array(), $CSRFSecret = null)
 {
     $this->user = $user;
     parent::__construct(array(), $options, $CSRFSecret);
     // the defaults depend on the options, so set them after construction
     $this->setDefaults(array('max_per_page' => $user->getAttribute(self::getMaxPerPageName(), self::getMaxPerPageValue())));
 }
开发者ID:rbolliger,项目名称:otokou,代码行数:16,代码来源:PaginationMaxPerPageForm.class.php

示例12: __construct

 public function __construct($page = null)
 {
     if (!$page) {
         $page = new aPage();
     }
     $this->page = $page;
     parent::__construct();
 }
开发者ID:verenate,项目名称:gri,代码行数:8,代码来源:aRenameForm.class.php

示例13: __construct

 public function __construct($section = false)
 {
     if ($section === false) {
         $section = $_SERVER['REQUEST_URI'];
     }
     $this->section = $section;
     parent::__construct();
 }
开发者ID:hashir,项目名称:UoA,代码行数:8,代码来源:aFeedbackForm.class.php

示例14: __construct

 public function __construct($profileMember = array(), $options = array(), $CSRFSecret = null)
 {
     parent::__construct(array(), $options, $CSRFSecret);
     $profiles = Doctrine::getTable('Profile')->findAll();
     foreach ($profileMember as $profile) {
         $this->setDefault($profile->getName(), array('value' => $profile->getValue(), 'public_flag' => $profile->getPublicFlag()));
     }
 }
开发者ID:Kazuhiro-Murota,项目名称:OpenPNE3,代码行数:8,代码来源:MemberProfileForm.class.php

示例15: __construct

 public function __construct($active = null)
 {
     if (is_null($active)) {
         $active = array('1');
     }
     $this->active = array_flip($active);
     parent::__construct();
 }
开发者ID:verenate,项目名称:gri,代码行数:8,代码来源:aMediaEditImagesForm.class.php


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