Location: PHPKode > projects > Course-manager > courseman-0.1.1/data-types.php
<?php
  function &text_field($description,
                       $field,
	               $table,
	               $column) {
    global $debug,$data_fields;
    if($debug["old-debug"]) {
?>
<pre>
text_field
</pre>
<?php
    }
    $data_fields[$field] =& registered_object(array(
	'auxiliary_javascript' => null_string_generator,
	'data_record' => submitted_data_record,
	'description' => $description,
	'description_input_separator' => horizontal_description_input_separator,
	'field' => $field,
	'has_method' => defines_method,
	'hidden_value_pass' => hidden_value_pass,
	'identifying_record' => empty_data_record,
	'initialize_interoperations' => null_string_generator,
	'input_check_condition' => input_empty_condition,
	'input_check' => null_string_generator,
	'input_echo' => text_input_echo,
	'input_layout' => text_input_layout,
	'input_reload' => text_input_reload,
	'layout_elements' => array(''),
	'annotated_layout' => annotated_layout,
	'annotation_layout' => null_string_generator,
	'object_identifier' => field_name_identifier,
	'requestable_code_once' => requestable_code_once,
	'requestable_code' => visible_elements_registration_code,
	'server_input_check_condition' => server_side_input_condition,
	'server_input_check' => null_string_generator,
	'server_side_relevance' => truth,
	'column' => $column,
	'table' => $table,
	'calls' => method_call));
    return $data_fields[$field];
  }
  function &checkbox_field($description,$field,$table,$column) {
    global $debug,$data_fields;
    if($debug['old-debug']) {
?>
<pre>
text_field
</pre>
<?php
    }
    $data_fields[$field] =& registered_object(array(
	'auxiliary_javascript' => null_string_generator,
	'data_record' => submitted_data_record,
	'description' => $description,
	'field' => $field,
	'has_method' => defines_method,
	'hidden_value_pass' => hidden_value_pass,
	'identifying_record' => empty_data_record,
	'initialize_interoperations' => null_string_generator,
	'input_check_condition' => checkbox_unchecked_condition,
	'input_check' => null_string_generator,
	'input_echo' => null_string_generator,
	'input_layout' => checkbox_input_layout,
	'input_reload' => null_string_generator,
	'layout_elements' => array(''),
	'annotated_layout' => annotated_layout,
	'annotation_layout' => null_string_generator,
	'object_identifier' => field_name_identifier,
	'requestable_code_once' => requestable_code_once,
	'requestable_code' => visible_elements_registration_code,
	'server_input_check_condition' => server_side_input_condition,
	'server_input_check' => null_string_generator,
	'server_side_relevance' => truth,
	'column' => $column,
	'table' => $table,
	'calls' => method_call));
    return $data_fields[$field];
  }
  function &multiple_choice_field($description,
                                  $field,
			 	  $table,
				  $column,
				  $option_index_column) {
    global $data_fields;
    $data_fields[$field] =& registered_object(array(
	'annotated_layout' => annotated_layout,
	'annotation_layout' => null_string_generator,
	'auxiliary_javascript' => null_string_generator,
	'column' => $column,
	'data_record' => submitted_predefined_data_record,
	'description' => $description,
	'description_input_separator' => horizontal_description_input_separator,
	'field' => $field,
	'has_method' => defines_method,
	'hidden_value_pass' => hidden_value_pass,
	'identifying_record' => empty_data_record,
	'initialize_interoperations' => null_string_generator,
	'input_check' => null_string_generator,
	'input_choices' => option_choices,
	'input_echo' => predefined_input_echo,
	'input_reload' => predefined_input_reload,
	'layout_elements' => array(''),
	'object_identifier' => field_name_identifier,
	'option_index_column' => $option_index_column,
	'requestable_code_once' => requestable_code_once,
	'requestable_code' => visible_elements_registration_code,
	'server_input_check_condition' => server_side_input_condition,
	'server_input_check' => null_string_generator,
	'server_side_relevance' => truth,
	'table' => $table,
	'specifying_joins' => '',
	'specifying_tables' => '',
	'trigger_overlay' => array(
		'auxiliary_javascript' => input_trigger_code),
	'calls' => method_call));
    return $data_fields[$field];
  }
  function alternative_inputs($elements,$omission_alert) {
    global $debug;
    if($debug["old-debug"]) {
?>
<pre>
alternative_inputs
</pre>
<?php
    }
    return registered_object(array(
	'elements' => $elements,
	'has_method' => defines_method,
	'initial_data_record' => array(),
	'initial_identifying_record' => array(),
	'initial_input_echo' => null,
	'initial_server_input_check_condition' => true,
	'input_check_condition' => disjuncted_input_checks,
	'input_check' => mandatory_input_check,
	'omission_alert' => $omission_alert,
	'reduction_data_record' => merged_data_records,
	'reduction_identifying_record' => merged_data_records,
	'reduction_input_echo' => null_reduce,
	'reduction_server_input_check_condition' => conjuncted,
	'server_input_check' => server_side_input_check,
	'calls' => fallback_to_reduced_method_call));
  }
  function reduced_input($elements) {
    global $debug;
    if($debug["old-debug"]) {
?>
<pre>
reduced_input
</pre>
<?php
    }
    return registered_object(array(
	'elements' => $elements,
	'has_method' => defines_method,
	'initial_data_record' => array(),
	'initial_identifying_record' => array(),
	'initial_input_echo' => null,
	'reduction_data_record' => merged_data_records,
	'reduction_identifying_record' => merged_data_records,
	'reduction_input_echo' => null_reduce,
	'calls' => reduced_method_call));
  }
  function &vertically_layouted_input($horizontal) {
    global $objects,$data_fields;
    $horizontal =& $objects[$horizontal['oid']];
    $horizontal['description_input_separator']
			= vertical_description_input_separator;
    array_push($horizontal['layout_elements'], '_input');
    $data_fields[$horizontal['field']] = $horizontal;
    $data_fields[$horizontal['field']] =& reregistered_object(
    					$data_fields[$horizontal['field']]);
    return $data_fields[$horizontal['field']];
  }
  function &radio_choosing($choices) {
    global $objects,$data_fields;
    $choices =& $objects[$choices['oid']];
    $choices['input_check_condition'] = input_unchecked_condition;
    $choices['input_layout'] = radio_input_layout;
    $choices['trigger_overlay']['input_layout'] = radio_input_layout_triggering;
    $data_fields[$choices['field']] =& reregistered_object($choices);
    return $data_fields[$choices['field']];
  }
  function &menu_choosing($choices) {
    global $objects,$data_fields;
    $choices =& $objects[$choices['oid']];
    $choices['input_check_condition'] = input_empty_condition;
    $choices['input_layout'] = menu_input_layout;
    $choices['trigger_overlay']['input_layout'] = menu_input_layout_triggering;
    $data_fields[$choices['field']] =& reregistered_object($choices);
    return $data_fields[$choices['field']];
  }
  function &multilingual($unilingual) {
    global $objects,$data_fields,$language;
    $unilingual =& $objects[$unilingual['oid']];
    $unilingual['input_choices'] = translated_choices;
    $unilingual['specifying_joins'] .= "
	AND language.id=language
	AND language.code='" . pg_escape_string($language) . "'";
    $unilingual['specifying_tables'] .= ',language';
    $data_fields[$unilingual['field']] =& reregistered_object($unilingual);
    return $data_fields[$unilingual['field']];
  }
  function &annotated_input($nonannotated,$annotation) {
    global $objects;
    $annotated =& $objects[$nonannotated['oid']];
    $annotated['annotation_layout'] = annotation_layout;
    $annotated['annotation'] = $annotation;
    array_push($annotated['layout_elements'], '_annotation');
    return $annotated;
  }
  function &non_saved_input($saved) {
    global $objects;
    $non_saved =& $objects[$saved['oid']];
    $non_saved['data_record'] = empty_data_record;
    return $non_saved;
  }
  function &identifying_input($nonidentifying) {
    global $objects;
    $identifying =& $objects[$nonidentifying['oid']];
    $identifying['identifying_record'] = $identifying['data_record'];
    return $identifying;
  }
  function &mandatory_input($nonmandatory,$omission_alert) {
    global $objects;
    $mandatory =& $objects[$nonmandatory['oid']];
    $mandatory['input_check'] = mandatory_input_check;
    $mandatory['server_input_check'] = server_side_input_check;
    $mandatory['omission_alert'] = $omission_alert;
    $mandatory['field_marker'] = "<span class='hinweis'>*</span>
";
    return $mandatory;
  }
  function &triggered_input($untriggered,$trigger_field,$trigger_value) {
    global $data_fields;
    $untriggered['trigger_field'] = $trigger_field;
    $untriggered['trigger_value'] = $trigger_value;
    $untriggered['initialize_interoperations'] = hook_conditional_input;
    $untriggered['server_side_relevance']
		= server_side_triggered_condition;
    $untriggered['relevance'] = triggered_condition;
    $untriggered['attributes'] .= " style='visibility:hidden'";
    $data_fields[$untriggered['field']] = $untriggered;
    $data_fields[$untriggered['field']] =& reregistered_object(
    					$data_fields[$untriggered['field']]);
    return $data_fields[$untriggered['field']];
  }
  function &numeric_input($nonnumeric) {
    global $data_fields;
    $nonnumeric['input_check_condition'] = input_invalid_number_condition;
    $nonnumeric['server_input_check_condition']
    		= server_side_invalid_number_condition;
    $data_fields[$nonnumeric['field']] = $nonnumeric;
    $data_fields[$nonnumeric['field']] =& reregistered_object(
    					$data_fields[$nonnumeric['field']]);
    return $data_fields[$nonnumeric['field']];
  }
  function &radio_field($description,
                                 $field,
			 	 $table,
				 $column,
				 $option_index_column) {
    return radio_choosing(multiple_choice_field($description,
                                 $field,
			 	 $table,
				 $column,
				 $option_index_column));
  }
  function &menu_field($description,
                                 $field,
			 	 $table,
				 $column,
				 $option_index_column) {
    return menu_choosing(multiple_choice_field($description,
                                 $field,
			 	 $table,
				 $column,
				 $option_index_column));
  }
?>
Return current item: Course-manager