r82318 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82317‎ | r82318 | r82319 >
Date:04:24, 17 February 2011
Author:yaron
Status:deferred
Tags:
Comment:
Expanded set of methods in each class, to match the new structure for form-input classes
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormInputs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormInputs.php
@@ -9,32 +9,109 @@
1010 * @author Sanyam Goyal
1111 */
1212
 13+/**
 14+ * Parent class for all form input classes.
 15+ */
1316 class SFFormInput {
 17+ /**
 18+ * Returns the set of input types, other than the main one, defined
 19+ * by this class; with the set of additional field arguments to
 20+ * be passed to each one.
 21+ */
 22+ public static function getAlternateInputTypes() {
 23+ return array();
 24+ }
 25+
 26+ /**
 27+ * Returns the set of SMW property types for which this input is
 28+ * meant to be the default one - ideally, no more than one input
 29+ * should declare itself the default for any specific type.
 30+ */
 31+ public static function getDefaultPropTypes() {
 32+ return array();
 33+ }
 34+
 35+ /**
 36+ * Returns the set of SMW property types which this input can
 37+ * handle, but for which it isn't the default input.
 38+ */
 39+ public static function getOtherPropTypesHandled() {
 40+ return array();
 41+ }
 42+
 43+ /**
 44+ * Like getDefaultPropTypes(), but for a field which holds a
 45+ * list of values instead of just one.
 46+ */
 47+ public static function getDefaultPropTypeLists() {
 48+ return array();
 49+ }
 50+
 51+ /**
 52+ * Like getOtherPropTypesHandled(), but for a field which holds a
 53+ * list of values instead of just one.
 54+ */
 55+ public static function getOtherPropTypeListsHandled() {
 56+ return array();
 57+ }
 58+
 59+ /**
 60+ * Returns the set of parameters that every form input will have
 61+ * automatically, and that don't need to be declared.
 62+ */
1463 public static function getStandardParameters() {
1564 $params = array();
1665 $params[] = array( 'name' => 'restricted', 'type' => 'boolean' );
1766 $params[] = array( 'name' => 'mandatory', 'type' => 'boolean' );
18 - return array();
 67+ return $params;
1968 }
2069
 70+ /**
 71+ * Returns the set of parameters for this form input.
 72+ */
2173 public static function getParameters() {
2274 $params = array();
2375 $params[] = array( 'name' => 'class', 'type' => 'string' );
2476 $params[] = array( 'name' => 'default', 'type' => 'string' );
2577 $params[] = array( 'name' => 'preload', 'type' => 'string' );
26 - return array();
 78+ return $params;
2779 }
2880 }
2981
 82+/**
 83+ * The base class for every form input that holds a pre-set enumeration
 84+ * of values.
 85+ */
3086 class SFEnumInput extends SFFormInput {
 87+ public static function getOtherPropTypesHandled() {
 88+ return array( 'enumeration' );
 89+ }
 90+
3191 public static function getParameters() {
3292 $params = parent::getParameters();
 93+ $params[] = array( 'name' => 'values', 'type' => 'string' );
 94+ $params[] = array( 'name' => 'values from property', 'type' => 'string' );
 95+ $params[] = array( 'name' => 'values from category', 'type' => 'string' );
 96+ $params[] = array( 'name' => 'values from namespace', 'type' => 'string' );
 97+ $params[] = array( 'name' => 'values from concept', 'type' => 'string' );
3398 $params[] = array( 'name' => 'show on select', 'type' => 'string' );
3499 return $params;
35100 }
36101 }
37102
 103+/**
 104+ * The base class for every form input that holds a list of elements, each
 105+ * one from a pre-set enumeration of values.
 106+ */
38107 class SFMultiEnumInput extends SFEnumInput {
 108+ public static function getOtherPropTypesHandled() {
 109+ return array();
 110+ }
 111+
 112+ public static function getOtherPropTypeListsHandled() {
 113+ return array( 'enumeration' );
 114+ }
 115+
39116 public static function getParameters() {
40117 $params = parent::getParameters();
41118 $params[] = array( 'name' => 'delimiter', 'type' => 'string' );
@@ -43,6 +120,42 @@
44121 }
45122
46123 class SFTextInput extends SFFormInput {
 124+ public static function getName() {
 125+ return 'text';
 126+ }
 127+
 128+ public static function getAlternateInputTypes() {
 129+ return array(
 130+ array( 'year', array( 'size' => 4 ) )
 131+ );
 132+ }
 133+
 134+ public static function getDefaultPropTypes() {
 135+ return array(
 136+ '_str' => array( 'field_type' => 'string' ),
 137+ '_num' => array( 'field_type' => 'number' ),
 138+ '_uri' => array( 'field_type' => 'URL' ),
 139+ '_ema' => array( 'field_type' => 'email' )
 140+ );
 141+ }
 142+
 143+ public static function getOtherPropTypesHandled() {
 144+ return array( '_wpg', '_geo' );
 145+ }
 146+
 147+ public static function getDefaultPropTypeLists() {
 148+ return array(
 149+ '_str' => array( 'field_type' => 'string', 'is_list' => 'true', 'size' => '100' ),
 150+ '_num' => array( 'field_type' => 'number', 'is_list' => 'true', 'size' => '100' ),
 151+ '_uri' => array( 'field_type' => 'URL', 'is_list' => 'true' ),
 152+ '_ema' => array( 'field_type' => 'email', 'is_list' => 'true' )
 153+ );
 154+ }
 155+
 156+ public static function getOtherPropTypeListsHandled() {
 157+ return array( '_wpg' );
 158+ }
 159+
47160 static function uploadLinkHTML( $input_id, $delimiter = null, $default_filename = null ) {
48161 $upload_window_page = SpecialPage::getPage( 'UploadWindow' );
49162 $query_string = "sfInputID=$input_id";
@@ -68,17 +181,17 @@
69182 return $text;
70183 }
71184
72 - static function getText( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
 185+ static function getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
73186 // If it's an autocomplete, call the with-autocomplete function
74187 // instead.
75188 if ( array_key_exists( 'autocompletion source', $other_args ) ) {
76 - return SFTextWithAutocompleteInput::getText( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args );
 189+ return SFTextWithAutocompleteInput::getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args );
77190 }
78191
79192 // If there are possible values specified, call the dropdown
80193 // function.
81194 if ( array_key_exists( 'possible_values', $other_args ) && $other_args['possible_values'] != null )
82 - return SFDropdownInput::getText( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args );
 195+ return SFDropdownInput::getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args );
83196
84197 global $sfgTabIndex, $sfgFieldNum;
85198
@@ -164,7 +277,21 @@
165278 }
166279
167280 class SFDropdownInput extends SFEnumInput {
168 - static function getText( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
 281+ public static function getName() {
 282+ return 'dropdown';
 283+ }
 284+
 285+ public static function getDefaultPropTypes() {
 286+ return array(
 287+ 'enumeration' => array()
 288+ );
 289+ }
 290+
 291+ public static function getOtherPropTypesHandled() {
 292+ return array();
 293+ }
 294+
 295+ static function getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
169296 global $sfgTabIndex, $sfgFieldNum, $sfgShowOnSelect;
170297
171298 $className = ( $is_mandatory ) ? "mandatoryField" : "createboxInput";
@@ -223,7 +350,11 @@
224351 }
225352
226353 class SFListBoxInput extends SFMultiEnumInput {
227 - static function getText( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
 354+ public static function getName() {
 355+ return 'listbox';
 356+ }
 357+
 358+ static function getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
228359 global $sfgTabIndex, $sfgFieldNum, $sfgShowOnSelect;
229360
230361 $className = ( $is_mandatory ) ? "mandatoryField" : "createboxInput";
@@ -290,7 +421,21 @@
291422 }
292423
293424 class SFCheckboxesInput extends SFMultiEnumInput {
294 - static function getText( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
 425+ public static function getName() {
 426+ return 'checkboxes';
 427+ }
 428+
 429+ public static function getDefaultPropTypeLists() {
 430+ return array(
 431+ 'enumeration' => array()
 432+ );
 433+ }
 434+
 435+ public static function getOtherPropTypeListsHandled() {
 436+ return array();
 437+ }
 438+
 439+ static function getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
295440 global $sfgTabIndex, $sfgFieldNum, $sfgShowOnSelect;
296441
297442 $checkbox_class = ( $is_mandatory ) ? "mandatoryField" : "createboxInput";
@@ -368,15 +513,20 @@
369514 }
370515
371516 class SFComboBoxInput extends SFFormInput {
372 - static function getText( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
 517+ public static function getName() {
 518+ return 'combobox';
 519+ }
 520+
 521+ public static function getOtherPropTypesHandled() {
 522+ return array( '_wpg', '_str' );
 523+ }
 524+
 525+ static function getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
373526 if ( array_key_exists( 'no autocomplete', $other_args ) &&
374527 $other_args['no autocomplete'] == true ) {
375528 unset( $other_args['autocompletion source'] );
376 - return SFTextInput::getText( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args );
 529+ return SFTextInput::getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args );
377530 }
378 - // If a set of values was specified, print a dropdown instead.
379 - if ( array_key_exists( 'possible_values', $other_args ) && $other_args['possible_values'] != null )
380 - return SFDropdownInput::getText( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args );
381531
382532 global $sfgTabIndex, $sfgFieldNum;
383533
@@ -434,6 +584,30 @@
435585 }
436586
437587 class SFTextWithAutocompleteInput extends SFTextInput {
 588+ public static function getName() {
 589+ return 'text with autocomplete';
 590+ }
 591+
 592+ public static function getDefaultPropTypes() {
 593+ return array(
 594+ '_wpg' => array()
 595+ );
 596+ }
 597+
 598+ public static function getOtherPropTypesHandled() {
 599+ return array( '_str' );
 600+ }
 601+
 602+ public static function getDefaultPropTypeLists() {
 603+ return array(
 604+ '_wpg' => array( 'is_list' => true, 'size' => 100 )
 605+ );
 606+ }
 607+
 608+ public static function getOtherPropTypeListsHandled() {
 609+ return array( '_str' );
 610+ }
 611+
438612 static function setAutocompleteValues( $field_args ) {
439613 global $sfgAutocompleteValues;
440614
@@ -473,17 +647,17 @@
474648 return array( $autocompleteSettings, $remoteDataType, $delimiter );
475649 }
476650
477 - static function getText( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
 651+ static function getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
478652 // If 'no autocomplete' was specified, print a regular text
479653 // entry instead.
480654 if ( array_key_exists( 'no autocomplete', $other_args ) &&
481655 $other_args['no autocomplete'] == true ) {
482656 unset( $other_args['autocompletion source'] );
483 - return SFTextInput::getText( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args );
 657+ return SFTextInput::getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args );
484658 }
485659 // if a set of values was specified, print a dropdown instead
486660 if ( array_key_exists( 'possible_values', $other_args ) && $other_args['possible_values'] != null )
487 - return SFDropdownInput::getText( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args );
 661+ return SFDropdownInput::getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args );
488662
489663 global $sfgTabIndex, $sfgFieldNum;
490664
@@ -538,22 +712,38 @@
539713 }
540714
541715 public static function getParameters() {
542 - $params = array();
543 - $params[] = array( 'name' => 'maxlength', 'type' => 'int' );
 716+ $params = parent::getParameters();
 717+ $params[] = array( 'name' => 'values from property', 'type' => 'string' );
 718+ $params[] = array( 'name' => 'values from category', 'type' => 'string' );
 719+ $params[] = array( 'name' => 'values from namespace', 'type' => 'string' );
 720+ $params[] = array( 'name' => 'values from concept', 'type' => 'string' );
 721+ $params[] = array( 'name' => 'values', 'type' => 'string' );
544722 $params[] = array( 'name' => 'list', 'type' => 'boolean' );
545723 $params[] = array( 'name' => 'remote autocompletion', 'type' => 'boolean' );
546 - return array();
 724+ return $params;
547725 }
548726 }
549727
550 -class SFTextAreaWithAutocompleteInput extends SFTextWithAutocompleteInput {
551 - static function getText( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
 728+class SFTextAreaWithAutocompleteInput extends SFTextAreaInput {
 729+ public static function getName() {
 730+ return 'textarea with autocomplete';
 731+ }
 732+
 733+ public static function getOtherPropTypesHandled() {
 734+ return array( '_wpg', '_str' );
 735+ }
 736+
 737+ public static function getOtherPropTypeListsHandled() {
 738+ return array( '_wpg', '_str' );
 739+ }
 740+
 741+ static function getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
552742 // If 'no autocomplete' was specified, print a regular
553743 // textarea instead.
554744 if ( array_key_exists( 'no autocomplete', $other_args ) &&
555745 $other_args['no autocomplete'] == true ) {
556746 unset( $other_args['autocompletion source'] );
557 - return SFTextAreaInput::getText( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args );
 747+ return SFTextAreaInput::getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args );
558748 }
559749
560750 global $sfgTabIndex, $sfgFieldNum;
@@ -589,15 +779,13 @@
590780 }
591781 if ( array_key_exists( 'maxlength', $other_args ) ) {
592782 $maxlength = $other_args['maxlength'];
593 - // For every actual character pressed (i.e.,
594 - // excluding things like the Shift key),
595 - // reduce the string to its allowed length if
596 - // it's exceeded that.
597 - // This JS code is complicated so that it'll
598 - // work correctly in IE - IE moves the cursor
599 - // to the end whenever this.value is reset,
600 - // so we'll make sure to do that only when
601 - // we need to.
 783+ // For every actual character pressed (i.e., excluding
 784+ // things like the Shift key), reduce the string to
 785+ // its allowed length if it's exceeded that.
 786+ // This JS code is complicated so that it'll work
 787+ // correctly in IE - IE moves the cursor to the end
 788+ // whenever this.value is reset, so we'll make sure
 789+ // to do that only when we need to.
602790 $maxLengthJSCheck = "if (window.event && window.event.keyCode < 48 && window.event.keyCode != 13) return; if (this.value.length > $maxlength) { this.value = this.value.substring(0, $maxlength); }";
603791 $textarea_attrs['onKeyDown'] = $maxLengthJSCheck;
604792 $textarea_attrs['onKeyUp'] = $maxLengthJSCheck;
@@ -622,19 +810,37 @@
623811 }
624812
625813 public static function getParameters() {
626 - $params = array();
627 - $params[] = array( 'name' => 'maxlength', 'type' => 'int' );
 814+ $params = parent::getParameters();
 815+ $params[] = array( 'name' => 'values from property', 'type' => 'string' );
 816+ $params[] = array( 'name' => 'values from category', 'type' => 'string' );
 817+ $params[] = array( 'name' => 'values from namespace', 'type' => 'string' );
 818+ $params[] = array( 'name' => 'values from concept', 'type' => 'string' );
 819+ $params[] = array( 'name' => 'values', 'type' => 'string' );
628820 $params[] = array( 'name' => 'list', 'type' => 'boolean' );
629821 $params[] = array( 'name' => 'remote autocompletion', 'type' => 'boolean' );
630 - $params[] = array( 'name' => 'autogrow', 'type' => 'boolean' );
631 - return array();
 822+ return $params;
632823 }
633824 }
634825
635826 class SFTextAreaInput extends SFFormInput {
636 - static function getText( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
 827+ public static function getName() {
 828+ return 'textarea';
 829+ }
 830+
 831+ public static function getDefaultPropTypes() {
 832+ return array( '_txt' => array(), '_cod' => array() );
 833+ }
 834+
 835+ public static function getOtherPropTypesHandled() {
 836+ return array( '_wpg', '_str' );
 837+ }
 838+
 839+ public static function getOtherPropTypeListsHandled() {
 840+ return array( '_wpg', '_str' );
 841+ }
 842+
 843+ static function getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
637844 // set size values
638 -
639845 if ( ! array_key_exists( 'rows', $other_args ) ) {
640846 $other_args['rows'] = 5;
641847 }
@@ -645,7 +851,7 @@
646852 // If it's an autocomplete, call the with-autocomplete
647853 // function instead.
648854 if ( array_key_exists( 'autocompletion source', $other_args ) ) {
649 - return SFTextAreaWithAutocompleteInput::getText( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args );
 855+ return SFTextAreaWithAutocompleteInput::getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args );
650856 }
651857
652858 global $sfgTabIndex, $sfgFieldNum;
@@ -654,7 +860,7 @@
655861 if ( array_key_exists( 'class', $other_args ) ) {
656862 $className .= " " . $other_args['class'];
657863 }
658 - // use a special ID for the free text field, for FCK's needs
 864+ // Use a special ID for the free text field, for FCK's needs.
659865 $input_id = $input_name == "free_text" ? "free_text" : "input_$sfgFieldNum";
660866
661867 $rows = $other_args['rows'];
@@ -699,12 +905,21 @@
700906 $params = parent::getParameters();
701907 $params[] = array( 'name' => 'rows', 'type' => 'int' );
702908 $params[] = array( 'name' => 'cols', 'type' => 'int' );
 909+ $params[] = array( 'name' => 'maxlength', 'type' => 'int' );
703910 $params[] = array( 'name' => 'autogrow', 'type' => 'boolean' );
704911 return $params;
705912 }
706913 }
707914
708915 class SFDateInput extends SFFormInput {
 916+ public static function getName() {
 917+ return 'date';
 918+ }
 919+
 920+ public static function getDefaultPropTypes() {
 921+ return array( '_dat' => array() );
 922+ }
 923+
709924 static function monthDropdownHTML( $cur_month, $input_name, $is_disabled ) {
710925 global $sfgTabIndex, $wgAmericanDates;
711926
@@ -785,7 +1000,7 @@
7861001 return $text;
7871002 }
7881003
789 - static function getText( $date, $input_name, $is_mandatory, $is_disabled, $other_args ) {
 1004+ static function getHTML( $date, $input_name, $is_mandatory, $is_disabled, $other_args ) {
7901005 $text = self::getMainHTML( $date, $input_name, $is_mandatory, $is_disabled, $other_args );
7911006 $spanClass = "dateInput";
7921007 if ( $is_mandatory ) { $spanClass .= " mandatoryFieldSpan"; }
@@ -795,7 +1010,25 @@
7961011 }
7971012
7981013 class SFDateTimeInput extends SFDateInput {
799 - static function getText( $datetime, $input_name, $is_mandatory, $is_disabled, $other_args ) {
 1014+ public static function getName() {
 1015+ return 'datetime';
 1016+ }
 1017+
 1018+ public static function getAlternateInputTypes() {
 1019+ return array(
 1020+ array( 'datetime with timezone', array( 'include_timezone' => true ) )
 1021+ );
 1022+ }
 1023+
 1024+ public static function getDefaultPropTypes() {
 1025+ return array();
 1026+ }
 1027+
 1028+ public static function getOtherPropTypesHandled() {
 1029+ return array( '_dat' );
 1030+ }
 1031+
 1032+ static function getHTML( $datetime, $input_name, $is_mandatory, $is_disabled, $other_args ) {
8001033 global $sfgTabIndex, $sfg24HourTime;
8011034
8021035 $include_timezone = $other_args['include_timezone'];
@@ -882,10 +1115,30 @@
8831116
8841117 return $text;
8851118 }
 1119+
 1120+ public static function getParameters() {
 1121+ $params = parent::getParameters();
 1122+ $params[] = array( 'name' => 'include timezone', 'type' => 'boolean' );
 1123+ return $params;
 1124+ }
8861125 }
8871126
8881127 class SFRadioButtonInput extends SFEnumInput {
889 - static function getText( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
 1128+ public static function getName() {
 1129+ return 'radiobutton';
 1130+ }
 1131+
 1132+ public static function getDefaultPropTypes() {
 1133+ return array(
 1134+ 'enumeration' => array()
 1135+ );
 1136+ }
 1137+
 1138+ public static function getOtherPropTypeListsHandled() {
 1139+ return array();
 1140+ }
 1141+
 1142+ static function getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
8901143 global $sfgTabIndex, $sfgFieldNum, $sfgShowOnSelect;
8911144
8921145 if ( ( $possible_values = $other_args['possible_values'] ) == null )
@@ -970,7 +1223,15 @@
9711224 }
9721225
9731226 class SFCheckboxInput extends SFFormInput {
974 - static function getText( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
 1227+ public static function getName() {
 1228+ return 'checkbox';
 1229+ }
 1230+
 1231+ public static function getDefaultPropTypes() {
 1232+ return array( '_boo' => array() );
 1233+ }
 1234+
 1235+ static function getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
9751236 global $sfgTabIndex, $sfgFieldNum, $sfgShowOnSelect;
9761237
9771238 $className = ( $is_mandatory ) ? "mandatoryField" : "createboxInput";
@@ -1014,7 +1275,15 @@
10151276 }
10161277
10171278 class SFCategoryInput extends SFFormInput {
1018 - static function getText( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
 1279+ public static function getName() {
 1280+ return 'category';
 1281+ }
 1282+
 1283+ public static function getOtherPropTypesHandled() {
 1284+ return array( '_wpg' );
 1285+ }
 1286+
 1287+ static function getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
10191288 // escape if CategoryTree extension isn't included
10201289 if ( ! function_exists( 'efCategoryTreeParserHook' ) )
10211290 return null;
@@ -1083,10 +1352,26 @@
10841353
10851354 return $text;
10861355 }
 1356+
 1357+ public static function getParameters() {
 1358+ $params = parent::getParameters();
 1359+ $params[] = array( 'name' => 'top category', 'type' => 'string' );
 1360+ $params[] = array( 'name' => 'height', 'type' => 'int' );
 1361+ $params[] = array( 'name' => 'width', 'type' => 'int' );
 1362+ return $params;
 1363+ }
10871364 }
10881365
1089 -class SFCategoriesInput {
1090 - static function getText( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
 1366+class SFCategoriesInput extends SFCategoryInput {
 1367+ public static function getName() {
 1368+ return 'categories';
 1369+ }
 1370+
 1371+ public static function getOtherPropTypeListsHandled() {
 1372+ return array( '_wpg' );
 1373+ }
 1374+
 1375+ static function getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
10911376 // escape if CategoryTree extension isn't included
10921377 if ( ! function_exists( 'efCategoryTreeParserHook' ) )
10931378 return null;