當前位置: 首頁>>代碼示例>>PHP>>正文


PHP BaseFormDoctrine類代碼示例

本文整理匯總了PHP中BaseFormDoctrine的典型用法代碼示例。如果您正苦於以下問題:PHP BaseFormDoctrine類的具體用法?PHP BaseFormDoctrine怎麽用?PHP BaseFormDoctrine使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了BaseFormDoctrine類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: embedCollection

 /**
  * A convenience method for embedding collections.
  * 
  * @param BaseFormDoctrine $form
  * @param string $formName
  * @param string $relationAlias
  * @param array $options
  * @return void
  */
 private static function embedCollection(BaseFormDoctrine $form, $formName, $relationAlias, array $options)
 {
     // set required options
     $options['parent_object'] = $form->getObject();
     $options['relation_alias'] = $relationAlias;
     // initialize and embed the collection form
     $collectionForm = new jmsBaseCollectionForm(array(), $options);
     $form->embedForm($formName, $collectionForm);
 }
開發者ID:schmittjoh,項目名稱:jmsFormsPlugin,代碼行數:18,代碼來源:jmsBaseFormDoctrine.class.php

示例2: setup

  public function setup()
  {
    $this->setWidgets(array(
      'id'         => new sfWidgetFormInputHidden(),
      'country_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Country'), 'add_empty' => false)),
      'code'       => new sfWidgetFormInputText(),
      'name'       => new sfWidgetFormInputText(),
      'created_at' => new sfWidgetFormDateTime(),
      'updated_at' => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'         => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)),
      'country_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Country'))),
      'code'       => new sfValidatorString(array('max_length' => 32, 'required' => false)),
      'name'       => new sfValidatorString(array('max_length' => 64)),
      'created_at' => new sfValidatorDateTime(),
      'updated_at' => new sfValidatorDateTime(),
    ));

    $this->widgetSchema->setNameFormat('showmobile_zone[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }
開發者ID:ner0tic,項目名稱:showmobile,代碼行數:28,代碼來源:BaseShowmobileZoneForm.class.php

示例3: doSave

 protected function doSave($con = null)
 {
     $this->saveGroupsList($con);
     $this->savePermissionsList($con);
     $this->saveTypesList($con);
     parent::doSave($con);
 }
開發者ID:sensorsix,項目名稱:app,代碼行數:7,代碼來源:BasesfGuardUserForm.class.php

示例4: setup

  public function setup()
  {
    $this->setWidgets(array(
      'id'                    => new sfWidgetFormInputHidden(),
      'mailinglistversion_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('MailinglistVersion'), 'add_empty' => true)),
      'type'                  => new sfWidgetFormInputText(),
      'deleteworkflow'        => new sfWidgetFormInputText(),
      'archiveworkflow'       => new sfWidgetFormInputText(),
      'stopneworkflow'        => new sfWidgetFormInputText(),
      'detailsworkflow'       => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'id'                    => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'id', 'required' => false)),
      'mailinglistversion_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('MailinglistVersion'), 'required' => false)),
      'type'                  => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'deleteworkflow'        => new sfValidatorInteger(array('required' => false)),
      'archiveworkflow'       => new sfValidatorInteger(array('required' => false)),
      'stopneworkflow'        => new sfValidatorInteger(array('required' => false)),
      'detailsworkflow'       => new sfValidatorInteger(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('mailinglist_authorization_setting[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }
開發者ID:rlauenroth,項目名稱:cuteflow_v3,代碼行數:30,代碼來源:BaseMailinglistAuthorizationSettingForm.class.php

示例5: setup

  public function setup()
  {
    $this->setWidgets(array(
      'non_psycho_pat_id' => new sfWidgetFormInputHidden(),
      'ad_patient_id'     => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('AdPatient'), 'add_empty' => false)),
      'non_psycho_id'     => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('AdNonPsycho'), 'add_empty' => false)),
      'start_date'        => new sfWidgetFormDateTime(),
      'stop_date'         => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'non_psycho_pat_id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('non_psycho_pat_id')), 'empty_value' => $this->getObject()->get('non_psycho_pat_id'), 'required' => false)),
      'ad_patient_id'     => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('AdPatient'))),
      'non_psycho_id'     => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('AdNonPsycho'))),
      'start_date'        => new sfValidatorDateTime(),
      'stop_date'         => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('ad_non_psycho_pat[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }
開發者ID:rieteke,項目名稱:guizmed,代碼行數:26,代碼來源:BaseAdNonPsychoPatForm.class.php

示例6: doSave

 protected function doSave($con = null)
 {
     $this->saveAlbumsList($con);
     $this->savePhotosList($con);
     $this->saveEventList($con);
     parent::doSave($con);
 }
開發者ID:Gula,項目名稱:magic,代碼行數:7,代碼來源:BaseMGGalleryForm.class.php

示例7: setup

  public function setup()
  {
    $this->setWidgets(array(
      'id'         => new sfWidgetFormInputHidden(),
      'reason'     => new sfWidgetFormTextarea(),
      'referer'    => new sfWidgetFormInputText(),
      'state'      => new sfWidgetFormChoice(array('choices' => array('valid' => 'valid', 'invalid' => 'invalid', 'untreated' => 'untreated'))),
      'id_comment' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Comment'), 'add_empty' => false)),
      'created_at' => new sfWidgetFormDateTime(),
      'updated_at' => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'         => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)),
      'reason'     => new sfValidatorString(),
      'referer'    => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'state'      => new sfValidatorChoice(array('choices' => array(0 => 'valid', 1 => 'invalid', 2 => 'untreated'), 'required' => false)),
      'id_comment' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Comment'))),
      'created_at' => new sfValidatorDateTime(),
      'updated_at' => new sfValidatorDateTime(),
    ));

    $this->widgetSchema->setNameFormat('comment_report[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }
開發者ID:nacef,項目名稱:ijani,代碼行數:30,代碼來源:BaseCommentReportForm.class.php

示例8: setup

  public function setup()
  {
    $this->setWidgets(array(
      'id'              => new sfWidgetFormInputHidden(),
      'class_letter_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('ClassLetter'), 'add_empty' => false)),
      'person_id'       => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Person'), 'add_empty' => false)),
      'enrolment_id'    => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Enrolment'), 'add_empty' => true)),
      'sent_at'         => new sfWidgetFormDateTime(),
      'success'         => new sfWidgetFormInputCheckbox(),
      'failed'          => new sfWidgetFormInputCheckbox(),
      'email'           => new sfWidgetFormInputText(),
      'body'            => new sfWidgetFormTextarea(),
    ));

    $this->setValidators(array(
      'id'              => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)),
      'class_letter_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('ClassLetter'))),
      'person_id'       => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Person'))),
      'enrolment_id'    => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Enrolment'), 'required' => false)),
      'sent_at'         => new sfValidatorDateTime(),
      'success'         => new sfValidatorBoolean(array('required' => false)),
      'failed'          => new sfValidatorBoolean(array('required' => false)),
      'email'           => new sfValidatorEmail(array('max_length' => 255, 'required' => false)),
      'body'            => new sfValidatorString(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('ds_class_letter_recipient[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }
開發者ID:romankallweit,項目名稱:swingmachine,代碼行數:34,代碼來源:BasedsClassLetterRecipientForm.class.php

示例9: doSave

 protected function doSave($con = null)
 {
     $this->savegroupsList($con);
     $this->savepermissionsList($con);
     $this->saveSkinnyChecksList($con);
     parent::doSave($con);
 }
開發者ID:nacmartin,項目名稱:skinny,代碼行數:7,代碼來源:BasesfGuardUserForm.class.php

示例10: setup

  public function setup()
  {
    $this->setWidgets(array(
      'id'              => new sfWidgetFormInputHidden(),
      'address_format'  => new sfWidgetFormInputText(),
      'address_summary' => new sfWidgetFormInputText(),
      'created_at'      => new sfWidgetFormDateTime(),
      'updated_at'      => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'              => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)),
      'address_format'  => new sfValidatorString(array('max_length' => 128)),
      'address_summary' => new sfValidatorString(array('max_length' => 48, 'required' => false)),
      'created_at'      => new sfValidatorDateTime(),
      'updated_at'      => new sfValidatorDateTime(),
    ));

    $this->widgetSchema->setNameFormat('showmobile_address_format[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }
開發者ID:ner0tic,項目名稱:showmobile,代碼行數:26,代碼來源:BaseShowmobileAddressFormatForm.class.php

示例11: setup

  public function setup()
  {
    $this->setWidgets(array(
      'id'         => new sfWidgetFormInputHidden(),
      'name'       => new sfWidgetFormInputText(),
      'city'       => new sfWidgetFormInputText(),
      'state'      => new sfWidgetFormInputText(),
      'zip'        => new sfWidgetFormInputText(),
      'created_at' => new sfWidgetFormDateTime(),
      'updated_at' => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'         => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)),
      'name'       => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'city'       => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'state'      => new sfValidatorString(array('max_length' => 25, 'required' => false)),
      'zip'        => new sfValidatorString(array('max_length' => 25, 'required' => false)),
      'created_at' => new sfValidatorDateTime(),
      'updated_at' => new sfValidatorDateTime(),
    ));

    $this->widgetSchema->setNameFormat('company[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }
開發者ID:romankallweit,項目名稱:swingmachine,代碼行數:30,代碼來源:BaseCompanyForm.class.php

示例12: doSave

 protected function doSave($con = null)
 {
     $this->saveConnectedProductsList($con);
     $this->saveParameterOptionsList($con);
     $this->saveProductOrderList($con);
     parent::doSave($con);
 }
開發者ID:vcgato29,項目名稱:poff,代碼行數:7,代碼來源:BaseProductForm.class.php

示例13: setup

  public function setup()
  {
    $this->setWidgets(array(
      'id'             => new sfWidgetFormInputHidden(),
      'title'          => new sfWidgetFormInputText(),
      'type'           => new sfWidgetFormInputText(),
      'writeprotected' => new sfWidgetFormInputText(),
      'color'          => new sfWidgetFormInputText(),
      'deleted_at'     => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'             => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'id', 'required' => false)),
      'title'          => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'type'           => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'writeprotected' => new sfValidatorInteger(array('required' => false)),
      'color'          => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'deleted_at'     => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('field[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }
開發者ID:rlauenroth,項目名稱:cuteflow_v3,代碼行數:28,代碼來源:BaseFieldForm.class.php

示例14: doSave

 protected function doSave($con = null)
 {
     $this->savegroupsList($con);
     $this->savepermissionsList($con);
     $this->saveproceduresList($con);
     parent::doSave($con);
 }
開發者ID:retrofox,項目名稱:Huemul,代碼行數:7,代碼來源:BasesfGuardUserForm.class.php

示例15: setup

  public function setup()
  {
    $this->setWidgets(array(
      'notification_id' => new sfWidgetFormInputHidden(),
      'prev_user_id'    => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('AdUser_3'), 'add_empty' => false)),
      'new_user_id'     => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('AdUser'), 'add_empty' => false)),
      'patient_id'      => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('AdPatient'), 'add_empty' => false)),
      'reason'          => new sfWidgetFormTextarea(),
      'accepted'        => new sfWidgetFormInputText(),
      'checked'         => new sfWidgetFormInputText(),
      'date'            => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'notification_id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('notification_id')), 'empty_value' => $this->getObject()->get('notification_id'), 'required' => false)),
      'prev_user_id'    => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('AdUser_3'))),
      'new_user_id'     => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('AdUser'))),
      'patient_id'      => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('AdPatient'))),
      'reason'          => new sfValidatorString(array('required' => false)),
      'accepted'        => new sfValidatorInteger(array('required' => false)),
      'checked'         => new sfValidatorInteger(array('required' => false)),
      'date'            => new sfValidatorDateTime(),
    ));

    $this->widgetSchema->setNameFormat('ad_notification[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }
開發者ID:rieteke,項目名稱:guizmed,代碼行數:32,代碼來源:BaseAdNotificationForm.class.php


注:本文中的BaseFormDoctrine類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。