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


PHP CRM_Core_DAO_CustomField::_fields方法代码示例

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


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

示例1: array

 /**
  * returns all the column names of this table
  *
  * @access public
  * @return array
  */
 static function &fields()
 {
     if (!self::$_fields) {
         self::$_fields = array('id' => array('name' => 'id', 'type' => CRM_Utils_Type::T_INT, 'required' => true), 'custom_group_id' => array('name' => 'custom_group_id', 'type' => CRM_Utils_Type::T_INT, 'required' => true, 'FKClassName' => 'CRM_Core_DAO_CustomGroup', 'pseudoconstant' => array('table' => 'civicrm_custom_group', 'keyColumn' => 'id', 'labelColumn' => 'title')), 'name' => array('name' => 'name', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Name'), 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG), 'label' => array('name' => 'label', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Label'), 'required' => true, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'data_type' => array('name' => 'data_type', 'type' => CRM_Utils_Type::T_ENUM, 'title' => ts('Data Type'), 'required' => true, 'enumValues' => 'String, Int, Float, Money, Memo, Date, Boolean, StateProvince, Country, File, Link, ContactReference'), 'html_type' => array('name' => 'html_type', 'type' => CRM_Utils_Type::T_ENUM, 'title' => ts('Html Type'), 'required' => true, 'enumValues' => 'Text, TextArea, Select, Multi-Select, AdvMulti-Select, Radio, CheckBox, Select Date, Select State/Province, Select Country, Multi-Select Country, Multi-Select State/Province, File, Link, RichTextEditor, Autocomplete-Select'), 'default_value' => array('name' => 'default_value', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Default Value'), 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'is_required' => array('name' => 'is_required', 'type' => CRM_Utils_Type::T_BOOLEAN), 'is_searchable' => array('name' => 'is_searchable', 'type' => CRM_Utils_Type::T_BOOLEAN), 'is_search_range' => array('name' => 'is_search_range', 'type' => CRM_Utils_Type::T_BOOLEAN), 'weight' => array('name' => 'weight', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Weight'), 'required' => true, 'default' => '1'), 'help_pre' => array('name' => 'help_pre', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Help Pre')), 'help_post' => array('name' => 'help_post', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Help Post')), 'mask' => array('name' => 'mask', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Mask'), 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG), 'attributes' => array('name' => 'attributes', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Attributes'), 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'javascript' => array('name' => 'javascript', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Javascript'), 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'is_active' => array('name' => 'is_active', 'type' => CRM_Utils_Type::T_BOOLEAN), 'is_view' => array('name' => 'is_view', 'type' => CRM_Utils_Type::T_BOOLEAN), 'options_per_line' => array('name' => 'options_per_line', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Options Per Line')), 'text_length' => array('name' => 'text_length', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Text Length')), 'start_date_years' => array('name' => 'start_date_years', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Start Date Years')), 'end_date_years' => array('name' => 'end_date_years', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('End Date Years')), 'date_format' => array('name' => 'date_format', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Date Format'), 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG), 'time_format' => array('name' => 'time_format', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Time Format')), 'note_columns' => array('name' => 'note_columns', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Note Columns')), 'note_rows' => array('name' => 'note_rows', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Note Rows')), 'column_name' => array('name' => 'column_name', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Column Name'), 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'option_group_id' => array('name' => 'option_group_id', 'type' => CRM_Utils_Type::T_INT), 'filter' => array('name' => 'filter', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Filter'), 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE));
     }
     return self::$_fields;
 }
开发者ID:hguru,项目名称:224Civi,代码行数:13,代码来源:CustomField.php

示例2: array

 /**
  * Returns all the column names of this table
  *
  * @return array
  */
 static function &fields()
 {
     if (!self::$_fields) {
         self::$_fields = array('id' => array('name' => 'id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Custom Field ID'), 'description' => 'Unique Custom Field ID', 'required' => true), 'custom_group_id' => array('name' => 'custom_group_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Custom Group'), 'description' => 'FK to civicrm_custom_group.', 'required' => true, 'FKClassName' => 'CRM_Core_DAO_CustomGroup', 'html' => array('type' => 'Select'), 'pseudoconstant' => array('table' => 'civicrm_custom_group', 'keyColumn' => 'id', 'labelColumn' => 'title')), 'name' => array('name' => 'name', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Custom Field Name'), 'description' => 'Variable name/programmatic handle for this group.', 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG), 'label' => array('name' => 'label', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Custom Field Label'), 'description' => 'Text for form field label (also friendly name for administering this custom property).', 'required' => true, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'data_type' => array('name' => 'data_type', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Custom Field Data Type'), 'description' => 'Controls location of data storage in extended_data table.', 'required' => true, 'maxlength' => 16, 'size' => CRM_Utils_Type::TWELVE, 'html' => array('type' => 'Select'), 'pseudoconstant' => array('callback' => 'CRM_Core_BAO_CustomField::dataType')), 'html_type' => array('name' => 'html_type', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Custom Field HTML Type'), 'description' => 'HTML types plus several built-in extended types.', 'required' => true, 'maxlength' => 32, 'size' => CRM_Utils_Type::MEDIUM, 'pseudoconstant' => array('callback' => 'CRM_Core_SelectValues::customHtmlType')), 'default_value' => array('name' => 'default_value', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Custom Field Default'), 'description' => 'Use form_options.is_default for field_types which use options.', 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'is_required' => array('name' => 'is_required', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Custom Field Is Required?'), 'description' => 'Is a value required for this property.'), 'is_searchable' => array('name' => 'is_searchable', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Allow Searching on Field?'), 'description' => 'Is this property searchable.'), 'is_search_range' => array('name' => 'is_search_range', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Search as a Range'), 'description' => 'Is this property range searchable.'), 'weight' => array('name' => 'weight', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Order'), 'description' => 'Controls field display order within an extended property group.', 'required' => true, 'default' => '1'), 'help_pre' => array('name' => 'help_pre', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Custom Field Pre Text'), 'description' => 'Description and/or help text to display before this field.'), 'help_post' => array('name' => 'help_post', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Custom Field Post Text'), 'description' => 'Description and/or help text to display after this field.'), 'mask' => array('name' => 'mask', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Custom Field Formatting'), 'description' => 'Optional format instructions for specific field types, like date types.', 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG), 'attributes' => array('name' => 'attributes', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Custom Field Attributes'), 'description' => 'Store collection of type-appropriate attributes, e.g. textarea  needs rows/cols attributes', 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'javascript' => array('name' => 'javascript', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Custom Field Javascript'), 'description' => 'Optional scripting attributes for field.', 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'is_active' => array('name' => 'is_active', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Custom Field Is Active?'), 'description' => 'Is this property active?'), 'is_view' => array('name' => 'is_view', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Field is Viewable'), 'description' => 'Is this property set by PHP Code? A code field is viewable but not editable'), 'options_per_line' => array('name' => 'options_per_line', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Field Options Per Line'), 'description' => 'number of options per line for checkbox and radio'), 'text_length' => array('name' => 'text_length', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Field Length'), 'description' => 'field length if alphanumeric'), 'start_date_years' => array('name' => 'start_date_years', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Field Start Date'), 'description' => 'Date may be up to start_date_years years prior to the current date.'), 'end_date_years' => array('name' => 'end_date_years', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Field End Date'), 'description' => 'Date may be up to end_date_years years after the current date.'), 'date_format' => array('name' => 'date_format', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Field Data Format'), 'description' => 'date format for custom date', 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG), 'time_format' => array('name' => 'time_format', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Field Time Format'), 'description' => 'time format for custom date'), 'note_columns' => array('name' => 'note_columns', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Field Note Columns'), 'description' => ' Number of columns in Note Field '), 'note_rows' => array('name' => 'note_rows', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Field Note Rows'), 'description' => ' Number of rows in Note Field '), 'column_name' => array('name' => 'column_name', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Field Column Name'), 'description' => 'Name of the column that holds the values for this field.', 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'option_group_id' => array('name' => 'option_group_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Field Option Group'), 'description' => 'For elements with options, the option group id that is used'), 'filter' => array('name' => 'filter', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Field Filter'), 'description' => 'Stores Contact Get API params contact reference custom fields. May be used for other filters in the future.', 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'in_selector' => array('name' => 'in_selector', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Field Display'), 'description' => 'Should the multi-record custom field values be displayed in tab table listing'));
     }
     return self::$_fields;
 }
开发者ID:agroknow,项目名称:mermix,代码行数:12,代码来源:CustomField.php


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