• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP BaseFormDoctrine类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了BaseFormDoctrine类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: setup

  public function setup()
  {
    $this->setWidgets(array(
      'id'         => new sfWidgetFormInputHidden(),
      'user_id'    => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('User'), 'add_empty' => false)),
      'driver_id'  => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Driver'), '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)),
      'user_id'    => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('User'))),
      'driver_id'  => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Driver'))),
      'created_at' => new sfValidatorDateTime(),
      'updated_at' => new sfValidatorDateTime(),
    ));

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

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

    $this->setupInheritance();

    parent::setup();
  }
开发者ID:ner0tic,项目名称:showmobile,代码行数:26,代码来源:BaseShowmobilePassengerForm.class.php


示例17: doSave

 protected function doSave($con = null)
 {
     $this->saveTagsList($con);
     $this->saveAuthorsList($con);
     $this->saveRatersList($con);
     parent::doSave($con);
 }
开发者ID:bshaffer,项目名称:Symplist,代码行数:7,代码来源:BaseSymfonyPluginForm.class.php


示例18: setup

  public function setup()
  {
    $this->setWidgets(array(
      'id'       => new sfWidgetFormInputHidden(),
      'field_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Field'), 'add_empty' => true)),
      'value'    => new sfWidgetFormInputText(),
      'isactive' => new sfWidgetFormInputText(),
      'position' => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'id'       => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'id', 'required' => false)),
      'field_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Field'), 'required' => false)),
      'value'    => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'isactive' => new sfValidatorInteger(array('required' => false)),
      'position' => new sfValidatorInteger(array('required' => false)),
    ));

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

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

    $this->setupInheritance();

    parent::setup();
  }
开发者ID:rlauenroth,项目名称:cuteflow_v3,代码行数:26,代码来源:BaseFieldRadiogroupForm.class.php


示例19: doSave

 protected function doSave($con = null)
 {
     $this->saveMoviesList($con);
     $this->saveChaptersList($con);
     $this->saveEpisodesList($con);
     parent::doSave($con);
 }
开发者ID:nass600,项目名称:homeCENTER,代码行数:7,代码来源:BaseSubTrackForm.class.php


示例20: doSave

  protected function doSave($con = null)
  {
    $this->saveListsList($con);
    $this->saveMessagesList($con);

    parent::doSave($con);
  }
开发者ID:romankallweit,项目名称:swingmachine,代码行数:7,代码来源:BasesfNewsletterSubscriberForm.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP BaseFormFilterDoctrine类代码示例发布时间:2022-05-23
下一篇:
PHP BaseForm类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap