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


PHP Codes::getCategories方法代码示例

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


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

示例1: configure

 public function configure()
 {
     $this->widgetSchema['category'] = new sfWidgetFormChoice(array('choices' => Codes::getCategories()));
     $this->validatorSchema['category'] = new sfValidatorChoice(array('required' => false, 'choices' => array_keys(Codes::getCategories())));
     $this->widgetSchema['referenced_relation'] = new sfWidgetFormChoice(array('choices' => array('specimens' => 'Specimen Code', 'specimen_parts' => 'Parts Code')));
     $this->validatorSchema['referenced_relation'] = new sfValidatorChoice(array('required' => false, 'choices' => array('specimens' => 'specimens', 'specimen_parts' => 'specimen_parts')));
     $this->widgetSchema['code_part'] = new sfWidgetFormInput(array(), array('style' => 'width:97%;'));
     $this->widgetSchema['code_from'] = new sfWidgetFormInput(array(), array('class' => 'lsmall_size'));
     $this->widgetSchema['code_to'] = new sfWidgetFormInput(array(), array('class' => 'lsmall_size'));
     $this->validatorSchema['code_part'] = new sfValidatorString(array('required' => false, 'trim' => true));
     $this->validatorSchema['code_from'] = new sfValidatorString(array('required' => false, 'trim' => true));
     $this->validatorSchema['code_to'] = new sfValidatorString(array('required' => false, 'trim' => true));
     $this->mergePostValidator(new CodesLineValidatorSchema());
 }
开发者ID:naturalsciences,项目名称:Darwin,代码行数:14,代码来源:CodeLineForm.class.php

示例2: configure

 public function configure()
 {
     $this->useFields(array('code_category', 'code_prefix', 'code_prefix_separator', 'code', 'code_suffix', 'code_suffix_separator'));
     $this->widgetSchema['code_category'] = new sfWidgetFormChoice(array('choices' => Codes::getCategories()));
     $this->validatorSchema['code_category'] = new sfValidatorChoice(array('required' => false, 'choices' => array_keys(Codes::getCategories())));
     $this->widgetSchema['code_prefix'] = new sfWidgetFormInput();
     $this->widgetSchema['code_prefix']->setAttributes(array('class' => 'lsmall_size'));
     $this->validatorSchema['code_prefix'] = new sfValidatorString(array('required' => false, 'trim' => true));
     $this->widgetSchema['code_prefix_separator'] = new widgetFormSelectComplete(array('model' => 'Codes', 'table_method' => 'getDistinctPrefixSep', 'method' => 'getCodePrefixSeparator', 'key_method' => 'getCodePrefixSeparator', 'add_empty' => true, 'change_label' => '', 'add_label' => ''));
     $this->widgetSchema['code_prefix_separator']->setAttributes(array('class' => 'vvsmall_size'));
     $this->widgetSchema['code'] = new sfWidgetFormInput();
     //mrac 2015 06 03 new css class 'mrac_input_mask' for input mask
     $this->widgetSchema['code']->setAttributes(array('class' => 'medium_small_size code_mrac_input_mask'));
     $this->validatorSchema['code'] = new sfValidatorString(array('required' => false, 'trim' => true));
     $this->widgetSchema['code_suffix'] = new sfWidgetFormInput();
     $this->widgetSchema['code_suffix']->setAttributes(array('class' => 'lsmall_size'));
     $this->validatorSchema['code_suffix'] = new sfValidatorString(array('required' => false, 'trim' => true));
     $this->widgetSchema['code_suffix_separator'] = new widgetFormSelectComplete(array('model' => 'Codes', 'table_method' => 'getDistinctSuffixSep', 'method' => 'getCodeSuffixSeparator', 'key_method' => 'getCodeSuffixSeparator', 'add_empty' => true, 'change_label' => '', 'add_label' => ''));
     $this->widgetSchema['code_suffix_separator']->setAttributes(array('class' => 'vvsmall_size'));
     $this->mergePostValidator(new CodesValidatorSchema());
 }
开发者ID:naturalsciences,项目名称:Darwin,代码行数:21,代码来源:CodesForm.class.php


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