17 require_once SQ_INCLUDE_PATH.
'/asset_edit/asset_edit_fns.inc';
18 require_once SQ_CORE_PACKAGE_PATH.
'/data_source/data_source/data_source_edit_fns.inc';
36 public $result = NULL;
37 public $fields = Array();
38 public $selected_fields = Array();
39 public $group_by = Array();
49 parent::__construct();
50 $this->static_screens[
'details'][
'force_unlock'] = FALSE;
71 require_once SQ_PACKAGES_PATH.
'/trim/lib/trim_common.inc';
72 $write_access = $asset->writeAccess(
'attributes');
74 $var_list = $asset->attr(
'dynamic_vars');
78 $var_list_classified = Array (
79 'Search Parent Container' => Array (
80 'search_parent_container',
82 'General Search Options' => Array (
83 'search_parent_container',
95 foreach ($var_list_classified as $name => $options) {
97 <table
class=
"sq-backend-table">
99 <th style=
"width:200px;"><?php echo $name; ?></th>
100 <th>Default Value</th>
103 foreach ($options as $var) {
104 if (!isset($var_list[$var]))
continue;
106 $value = $var_list[$var];
107 $var_id = base64_encode($var);
113 echo ucwords(str_replace(
'_',
' ', urlencode($var)));
115 echo ucwords(str_replace(
'_',
' ', urlencode($var)));
118 <td valign=
"top" align=
"left">
123 $search_sort = FALSE;
124 if (strpos(urlencode($var),
'search_sort') !== FALSE) {
126 $list[
'None'] =
'None';
128 }
else if (urlencode($var) ==
'search_date_range_type') {
134 combo_box($prefix.
'_var_value['.$var_id.
']', $list, FALSE, $value, 0,
' style="width:200px;"');
135 }
else if (is_array($value)) {
136 $not_multiple = (bool) (strpos(urlencode($var),
'search_sort') === FALSE);
137 combo_box($prefix.
'_var_value['.$var_id.
']', $list, $not_multiple, $value, 8,
' style="width:200px;"', 40);
138 }
else if ( strpos(urlencode($var),
'descending') !== FALSE || strpos(urlencode($var),
'use_expanded_number') !== FALSE) {
139 combo_box($prefix.
'_var_value['.$var_id.
']', Array (TRUE =>
'Yes', FALSE =>
'No'), FALSE, $value);
141 text_box($prefix.
'_var_value['.$var_id.
']', $value,
'',
'',FALSE,
'style="width:200px;"');
144 if (is_array($value)) {
145 ?><ul style=
"position:relative;left:-41px;list-style:none;"><?php
146 foreach ($value as $key => $val) {
147 echo
'<li>'.$val.
'</li>';
150 }
else if ( strpos(urlencode($var),
'descending') !== FALSE || strpos(urlencode($var),
'use_expanded_number') !== FALSE) {
151 echo ($value) ?
'Yes' :
'No';
159 unset($var_list[$var]);
169 $o->sectionNote(translate(
'trim_ds_search_default_options_note'));
171 return $write_access;
185 $write_access = $asset->writeAccess(
'attributes');
186 $var_list = $asset->attr(
'dynamic_vars');
188 $o->openSection(
'Data Mappings');
190 $map = $asset->getAttribute(
'parameter_map');
192 $parameter_names = $map->getParameters();
194 foreach ($var_list as $var_name => $default) {
195 $map->setParameter($var_name,
'Variable: '.$var_name);
198 $map->paint($prefix.
'_parameter_map', !$write_access);
201 $o->sectionNote(translate(
'trim_ds_search_default_options_note'));
203 return $write_access;
217 $write_access = $asset->writeAccess(
'attributes');
218 if (!$write_access)
return FALSE;
219 $var_name_pattern =
'/^[a-zA-Z_\-0-9\.]+$/';
220 $var_list = $asset->attr(
'dynamic_vars');
222 $map = $asset->getAttribute(
'parameter_map');
224 $map->process($prefix.
'_parameter_map');
226 $asset->setAttrValue(
'parameter_map', unserialize($map->value));
228 return $write_access;
245 $var_name_pattern =
'/^[a-zA-Z_\-0-9\.]+$/';
247 $write_access = $asset->writeAccess(
'attributes');
248 if (!$write_access)
return FALSE;
250 $to_delete = array_get_index($_REQUEST, $prefix.
'_delete_var', Array());
251 $var_value = array_get_index($_REQUEST, $prefix.
'_var_value', Array());
252 $var_name = array_get_index($_REQUEST, $prefix.
'_var_name', Array());
254 $var_list = $asset->attr(
'dynamic_vars');
256 $map = $asset->getAttribute(
'parameter_map');
258 $parameter_names = $map->getParameters();
259 foreach ($var_list as $name => $default) {
260 $map->setParameter($name,
'Variable: '.$name);
263 foreach ($var_value as $hash => $value) {
264 $name = base64_decode($hash);
265 if (isset($to_delete[$hash])) {
266 unset($var_list[$name]);
271 $var_list[$name] = $value;
274 $new_var_list = Array();
275 $rename_success = FALSE;
278 foreach ($var_name as $hash => $new_name) {
279 $new_name = trim($new_name);
281 if (empty($new_name)) {
282 $rename_success = FALSE;
283 trigger_error(
'Variable name cannot be empty. No variables were renamed.', E_USER_NOTICE);
288 $new_name_is_valid = preg_match($var_name_pattern, $new_name);
289 if (!$new_name_is_valid) {
290 $rename_success = FALSE;
291 trigger_error(
'Variable name ['.htmlentities($new_name).
'] contains characters that are not allowed. Can only use letters (A-Za-z), digits(0-9), underscore (_), dash (-) and dot (.)', E_USER_NOTICE);
295 $name = base64_decode($hash);
298 if (!isset($var_list[$name]))
continue;
300 if (isset($new_var_list[$new_name])) {
301 $rename_success = FALSE;
302 trigger_error(
'Could not rename variables because variable name "'.htmlentities($new_name).
'" already exists', E_USER_NOTICE);
306 if ($new_name != $name) {
307 if (in_array($name, $parameter_names)) {
308 $map->moveParameter($name, $new_name);
310 $rename_success = TRUE;
313 $new_var_list[$new_name] = $var_list[$name];
318 if ($rename_success) $var_list = $new_var_list;
320 $new_names = array_get_index($_REQUEST, $prefix.
'_new_dynamic_data_name', Array());
321 if (!empty($new_names)) {
323 foreach ($new_names as $seq_number => $new_var_name) {
324 $new_var_name = trim($new_var_name);
326 $new_var_value = array_get_index($_REQUEST[$prefix.
'_new_dynamic_data_value'], $seq_number,
'');
327 if (empty($new_var_name)) {
328 if (!empty($new_var_value)) {
329 trigger_error(
'New variable name cannot be empty', E_USER_WARNING);
335 $new_name_is_valid = preg_match($var_name_pattern, $new_var_name);
336 if (!$new_name_is_valid) {
337 trigger_error(
'Variable name "'.htmlentities($new_var_name).
'" contains characters that are not allowed. Can only use letters (A-Za-z), digits(0-9), underscore (_), dash (-) and dot (.)', E_USER_NOTICE);
341 if (isset($var_list[$new_var_name])) {
342 trigger_error(
'Variable Name "'.htmlentities($new_var_name).
'" is already in use', E_USER_WARNING);
346 $var_list[$new_var_name] = $new_var_value;
347 $map->setParameter($new_var_name,
'Variable: '.$new_var_name);
351 $asset->setAttrValue(
'dynamic_vars', $var_list);
352 $asset->setAttrValue(
'parameter_map', unserialize($map->value));
370 $write_access = $asset->writeAccess(
'attributes');
371 $wsdl = $asset->attr(
'wsdl');
373 require_once SQ_LIB_PATH.
'/html_form/html_form.inc';
374 text_box($prefix.
'_wsdl_url', $wsdl,
'35');
379 return $write_access;
394 if (!$asset->writeAccess(
'attributes'))
return FALSE;
397 $old_wsdl = $asset->attr(
'wsdl');
398 if (!empty($_POST[$prefix.
'_wsdl_url'])) {
399 $new_wsdl = trim($_POST[$prefix.
'_wsdl_url']);
400 if ($old_wsdl != $new_wsdl) {
401 $res = $asset->setAttrValue(
'wsdl', $new_wsdl);
425 $connector_link = $GLOBALS[
'SQ_SYSTEM']->am->getLink($asset->id, SQ_LINK_NOTICE,
'trim_connector', FALSE,
'trim_connector');
426 if (empty($connector_link)) {
427 $connector_asset_id = NULL;
429 $connector_asset_id = $connector_link[
'minorid'];
432 if ($asset->writeAccess(
'links')) {
433 asset_finder($prefix.
'_connector_node', $connector_asset_id, Array(
'trim_connector'=>
'D'));
435 if (empty($connector_asset_id)) {
436 echo
'No connector selected';
438 echo get_asset_tag_line($connector_asset_id);
458 $new_connector_id = @$_REQUEST[$prefix.
'_connector_node'][
'assetid'];
460 if (!$asset->writeAccess(
'links')) {
461 trigger_error(
'You do not have write access to change the connector link', E_USER_WARNING);
465 $current_connector_link = $GLOBALS[
'SQ_SYSTEM']->am->getLink($asset->id, SQ_LINK_NOTICE,
'trim_connector', FALSE,
'trim_connector');
466 $current_connector_asset_id = @$current_connector_link[
'minorid'];
468 if (!empty($current_connector_link)) {
471 if ((!empty($new_connector_id)) && ($current_connector_asset_id === $new_connector_id)) {
476 $GLOBALS[
'SQ_SYSTEM']->am->deleteAssetLink($current_connector_link[
'linkid']);
480 if (empty($new_connector_id))
return TRUE;
484 if (!empty($new_connector_id)) {
485 $new_connector_asset = $GLOBALS[
'SQ_SYSTEM']->am->getAsset($new_connector_id);
486 $result_id = $GLOBALS[
'SQ_SYSTEM']->am->createAssetLink($asset, $new_connector_asset, SQ_LINK_NOTICE,
'trim_connector');
488 if (empty($result_id)) {
489 trigger_error(
'Could not link the connector to this asset', E_USER_WARNING);
512 $wa = $asset->writeAccess(
'attributes');
516 <script type=
"text/javascript" src=
"<?php echo sq_web_path('data').'/asset_types/trim_saved_search/js/ajax.js' ?>">
519 <table style=
"width:auto;border-spacing:0px;" border=
"0">
521 <td width=
"90"><span style=
"font-weight:bold;">Check Update</span></td>
522 <td width=
"150"><span
id=
"update_text">Not Checked</span></td>
523 <td><?php
if ($wa) normal_button($prefix.
'_update',
'Check for Updates',
'sendRequest(\''.$asset->getURL().
'?check_update=1\', \'updateCheckInterface\');'); ?></td>
524 <td><?php
if ($wa) normal_button($prefix.
'_synch',
'Synchronize Now',
'sendRequest(\''.$asset->getURL().
'?synch_now=1\', \'updateSynchInterface\');'); ?></td>
525 <td><img
id=
"trim_saved_search_loader" src=
"<?php echo sq_web_path('data').'/asset_types/trim_saved_search/images/loader.gif'?>" style=
"display:none;" height=
"20" width
"20" /></td>
565 $wa = $asset->writeAccess(
'attributes');
566 $fields = $asset->attr(
'retrieved_fields');
567 $standard_fields = isset ($fields[
'standard_fields']) ? count($fields[
'standard_fields']) : 0;
568 $additional_fields = isset ($fields[
'additional_fields']) ? count($fields[
'additional_fields']) : 0;
569 $record_types = isset ($fields[
'record_types']) ? count($fields[
'record_types']) : 0;
575 if (!empty($_POST[$prefix.
'_retrieve'])) echo
'<span style="color:green;">';
576 echo (empty($fields) ?
'Empty' : $standard_fields.
' standard fields, '.$additional_fields.
' additional fields and '.$record_types.
' record types retrieved');
577 if (!empty($_POST[$prefix.
'_retrieve'])) echo
'</span>';
582 if ($wa) submit_button($prefix.
'_retrieve',
'Retrieve Now',
'');
605 if (!$asset->writeAccess(
'attributes'))
return FALSE;
606 $connection = $asset->getConnection();
608 if (!empty($_POST[$prefix.
'_retrieve']) && !empty($connection)) {
610 $st_fields = Array();
611 $udf_fields = Array();
612 $fields_type = Array();
614 $client =
new SoapClient($connection[
'wsdl'], $connection[
'authentication']);
615 $data = $client->ListProperties(Array(
'ObjectName' =>
'Record'));
616 foreach ($data->ListPropertiesResult->PropertyDescription as $field) {
617 if (preg_match(
'/^udf:/', (String) $field->Name)) {
618 $udf_fields[(String) $field->Name] = ((String) $field->Caption);
621 $st_fields[(String) $field->Name] = ((String) $field->Caption);
624 $fields_type[(String) $field->Name] = (String) $field->Type;
626 if((String) $field->Name ==
'recContents') $st_fields[
'recContainerTitle'] =
'Container Title';
630 }
catch (SoapFault $e) {
631 trigger_error($e->getMessage(), E_USER_WARNING);
638 $asset->setAttrValue(
'retrieved_fields', Array(
'standard_fields' => $st_fields,
'additional_fields' => $udf_fields,
'field_types' => $fields_type,
'record_types' => $record_types));
657 $write_access = $asset->writeAccess(
'attributes');
658 $var_list = $asset->attr(
'dynamic_vars');
659 $search_groups = isset($var_list[
'search_clauses'][
'search_groups']) ? $var_list[
'search_clauses'][
'search_groups'] : Array();
660 $global_logic = isset($var_list[
'search_clauses'][
'global_logic']) ? $var_list[
'search_clauses'][
'global_logic'] :
'AND';
663 $available_fields = Array(
'none' =>
'-- '.ucfirst(translate(
'trim_ds_search_add_search_field').
' --'));
664 $list = $asset->getRetrievedFields(
'additional');
669 foreach($search_groups as $group_data) {
670 $total_rows += count($group_data[
'content']);
671 if ($write_access) $total_rows ++;
675 <table
class ="sq-backend-table" border=
"1" style=
"margin-bottom: 7px; ">
677 <th rowspan=
"2"><?php echo translate(
'trim_ds_search_groups'); ?></th>
678 <th colspan=
"<?php echo $write_access ? 3 : 2; ?>"><?php echo translate(
'trim_ds_search_search_fields'); ?></th>
679 <th rowspan=
"2"><?php echo translate(
'trim_ds_search_logic_group'); ?></th>
683 <th rowspan=
"2"><?php echo translate(
'delete'); ?></th>
687 <th rowspan=
"2"><?php echo translate(
'trim_ds_search_logic_global'); ?></th>
690 <th><?php echo translate(
'name');?></th>
691 <th><?php echo translate(
'keyword');?> </th>
695 <th><?php echo translate(
'delete'); ?></th>
701 foreach ($search_groups as $group_index => $group_data) {
702 if ($write_access) $group_data[
'content'][] = Array(
'caption' =>
'new');
704 foreach ($group_data[
'content'] as $field_index => $field_data) {
708 if ($field_index == 0) {
710 <td rowspan=
"<?php echo (count($group_data['content'])); ?>">Group <?php echo ($group_index+1); ?></td>
714 <td
class=
"sq-backend-data" style=
"padding: 4px;">
716 if ($field_data[
'caption'] ==
'new') {
718 $count = count($group_data[
'content']);
719 combo_box($prefix.
'_fields['.$group_index.
']['.$count.
'][new_search_field]', $available_fields, FALSE,
'none');
722 echo $field_data[
'caption'];
724 $field_type = $asset->getRetrievedFieldType($field_data[
'name']);
725 echo (empty($field_type) ?
'' :
' ('.$field_type.
')');
731 if ($field_data[
'caption'] !=
'new') {
733 text_box($prefix.
'_fields['.$group_index.
']['.$field_index.
'][keyword]', $field_data[
'keyword'],
'35');
735 echo $field_data[
'keyword'];
743 <td
class=
"sq-backend-data">
745 if ($field_data[
'caption'] !=
'new') {
746 check_box($prefix.
'_fields['.$group_index.
']['.$field_index.
'][delete]');
752 if ($field_index == 0) {
755 <td rowspan=
"<?php echo count($group_data['content']);?>" style=
"vertical-align:middle; text-align:center;">
757 $group_logic_options = Array(
'AND' => translate(
'trim_ds_search_logic_and'),
'OR' => translate(
'trim_ds_search_logic_or'));
759 combo_box($prefix.
'_fields['.$group_index.
'][group_logic]', $group_logic_options, FALSE, array_get_index($group_data,
'group_logic',
'AND'), 0,
'title="'.translate(
'trim_ds_search_group_logic_note').
'"');
761 echo array_get_index($group_data,
'group_logic',
'AND');
768 if (($field_index == 0) && $write_access) {
771 <td rowspan=
"<?php echo count($group_data['content']);?>">
773 check_box($prefix.
'_fields['.$group_index.
'][delete]');
779 if ($group_index == 0 && $field_index == 0) {
782 <td rowspan=
"<?php echo $total_rows; ?>" style=
"vertical-align:middle; text-align:center;">
784 $global_logic_options = Array(
'AND' => translate(
'trim_ds_search_logic_and'),
'OR' => translate(
'trim_ds_search_logic_or'));
786 combo_box($prefix.
'_fields[global_logic]', $global_logic_options, FALSE, $global_logic, 0,
'title="'.translate(
'trim_ds_search_global_logic_note').
'"');
807 echo (
'<div class="sq-backend-smallprint">'.translate(
'trim_ds_search_add_search_field_group').
'</div>');
808 $count = count($search_groups);
809 combo_box($prefix.
'_fields['.$count.
'][new_search_group]', $available_fields, FALSE,
'none');
829 if (!$asset->writeAccess(
'attributes'))
return FALSE;
830 $var_list = $asset->attr(
'dynamic_vars');
831 $search_groups = Array();
834 $available_fields = Array();
835 $list = $asset->getRetrievedFields(
'additional');
838 if (isset($_POST[$prefix.
'_fields'])) {
840 if(isset($_POST[$prefix.
'_fields'][
'global_logic'])) {
841 $global_logic = $_POST[$prefix.
'_fields'][
'global_logic'];
842 unset($_POST[$prefix.
'_fields'][
'global_logic']);
845 $global_logic =
'AND';
848 foreach ($_POST[$prefix.
'_fields'] as $group_index => $group) {
850 if(isset($group[
'group_logic'])) {
851 $group_logic = $group[
'group_logic'];
852 unset($group[
'group_logic']);
855 $group_logic =
'AND';
859 if(isset($group[
'delete']))
continue;
860 if(isset($field[
'new_search_group']) && $field[
'new_search_group'] ===
'none')
continue;
861 if(isset($group[
'new_search_group']) && $group[
'new_search_group'] !=
'none') {
863 $new_group = Array();
864 $field_name = $group[
'new_search_group'];
865 $field_caption = isset($available_fields[$field_name]) ? $available_fields[$field_name] :
'';
866 $new_group[
'group_logic'] =
'AND';
867 $new_group[
'content'][] = Array(
'name' => $field_name,
'caption' => $field_caption,
'keyword' =>
'');
871 $new_group = Array();
872 $new_group[
'group_logic'] = $group_logic;
873 $new_group[
'content'] = Array();
875 foreach ($group as $field_index => $field) {
876 if(isset($field[
'delete']))
continue;
877 if(isset($field[
'new_search_field']) && $field[
'new_search_field'] ===
'none')
continue;
878 if(isset($field[
'new_search_field']) && $field[
'new_search_field'] !=
'none') {
880 $field_name = $field[
'new_search_field'];
881 $field_caption = isset($available_fields[$field_name]) ? $available_fields[$field_name] :
'';
886 $old_field = $var_list[
'search_clauses'][
'search_groups'][$group_index][
'content'][$field_index];
887 $field_name = $old_field[
'name'];
888 $field_caption = $old_field[
'caption'];
889 $keyword = $field[
'keyword'];
891 $new_group[
'content'][] = Array(
'name' => $field_name,
'caption' => $field_caption,
'keyword' => $keyword);
894 if(!empty($new_group[
'content'])) $search_groups[] = $new_group;
897 $var_list[
'search_clauses'][
'search_groups'] = $search_groups;
898 $var_list[
'search_clauses'][
'global_logic'] = $global_logic;
900 return ($asset->setAttrValue(
'dynamic_vars', $var_list));
918 $write_access = $asset->writeAccess(
'attributes');
919 $var_list = $asset->attr(
'dynamic_vars');
920 $result_fields = isset($var_list[
'result_fields']) ? $var_list[
'result_fields'] : Array();
923 $available_fields = Array(
'none' =>
'-- '.ucfirst(translate(
'trim_ds_search_add_result_field').
' --'));
924 $list = $asset->getRetrievedFields(
'all');
929 <table
class ="sq-backend-table" border=
"1" style=
"margin-bottom: 7px; ">
932 <th><?php echo translate(
'name');?></th>
933 <th><?php echo translate(
'type');?> </th>
934 <th><?php echo translate(
'field_category');?> </th>
938 <th><?php echo translate(
'delete'); ?></th>
944 foreach ($result_fields as $name => $caption) {
947 <td
class=
"sq-backend-data" style=
"padding: 4px;">
954 $field_type = $asset->getRetrievedFieldType($name);
955 echo (empty($field_type) ?
'' : $field_type);
960 echo(preg_match(
'/^udf:/', $name) ? translate(
'field_additional') : translate(
'field_standard'));
967 <td
class=
"sq-backend-data">
969 check_box($prefix.
'_result_fields['.$name.
'][delete]');
982 echo (
'<div class="sq-backend-smallprint">'.translate(
'trim_ds_search_result_field_note').
'</div>');
983 combo_box($prefix.
'_result_fields[new]', $available_fields, FALSE,
'none');
1004 if (!$asset->writeAccess(
'attributes'))
return FALSE;
1005 $var_list = $asset->attr(
'dynamic_vars');
1006 $result_fields = isset($var_list[
'result_fields']) ? $var_list[
'result_fields'] : Array();
1010 $list = $asset->getRetrievedFields(
'all');
1013 if (isset($_POST[$prefix.
'_result_fields'])) {
1014 foreach ($_POST[$prefix.
'_result_fields'] as $field => $value) {
1015 if (isset($field[
'delete']) && isset($result_fields[$field])) {
1016 unset($result_fields[$field]);
1019 if(isset($_POST[$prefix.
'_result_fields'][
'new']) && $_POST[$prefix.
'_result_fields'][
'new'] !==
'none') {
1020 $new_field = $_POST[$prefix.
'_result_fields'][
'new'];
1021 $field_caption = isset($available_fields[$new_field]) ? $available_fields[$new_field] :
'';
1022 $result_fields[$new_field] = $field_caption;
1026 $var_list[
'result_fields'] = $result_fields;
1027 return ($asset->setAttrValue(
'dynamic_vars', $var_list));
1045 $write_access = $asset->writeAccess(
'attributes');
1046 $retrieved = $asset->attr(
'retrieved_fields');
1047 $available_record_types = Array(
'none' =>
'-- '.ucfirst(translate(
'trim_ds_search_add_record_type').
' --'));
1048 $available_record_types += isset($retrieved[
'record_types']) ? $retrieved[
'record_types'] : Array();
1050 $var_list = $asset->attr(
'dynamic_vars');
1051 $record_types = isset($var_list[
'record_type_filter']) ? $var_list[
'record_type_filter'] : Array();
1055 <table
class ="sq-backend-table" border=
"1" style=
"margin-bottom: 7px; width:300px;">
1058 <th><?php echo translate(
'name');?></th>
1060 if ($write_access) {
1062 <th><?php echo translate(
'delete'); ?></th>
1068 foreach ($record_types as $uri => $name) {
1071 <td
class=
"sq-backend-data" style=
"padding: 4px;">
1078 if ($write_access) {
1081 <td
class=
"sq-backend-data">
1083 check_box($prefix.
'_record_type_filter['.$uri.
'][delete]');
1095 if ($write_access) {
1096 echo (
'<div class="sq-backend-smallprint">'.translate(
'trim_ds_search_record_type_filter_note').
'</div>');
1097 combo_box($prefix.
'_record_type_filter[new]', $available_record_types, FALSE,
'none');
1098 if(count($available_record_types) ==1 ) {
1099 echo (
'<div class="sq-backend-smallprint">'.translate(
'trim_ds_search_record_type_filter_no_record_type').
'</div>');
1121 if (!$asset->writeAccess(
'attributes'))
return FALSE;
1122 $var_list = $asset->attr(
'dynamic_vars');
1123 $record_types = isset($var_list[
'record_type_filter']) ? $var_list[
'record_type_filter'] : Array();
1127 $retrieved = $asset->attr(
'retrieved_fields');
1128 $available_record_types = isset($retrieved[
'record_types']) ? $retrieved[
'record_types'] : Array();
1130 if (isset($_POST[$prefix.
'_record_type_filter'])) {
1131 foreach ($_POST[$prefix.
'_record_type_filter'] as $field => $value) {
1132 if (isset($value[
'delete']) && isset($record_types[$field])) {
1133 unset($record_types[$field]);
1136 if(isset($_POST[$prefix.
'_record_type_filter'][
'new']) && $_POST[$prefix.
'_record_type_filter'][
'new'] !==
'none') {
1137 $new_uri = $_POST[$prefix.
'_record_type_filter'][
'new'];
1138 $record_name = isset($available_record_types[$new_uri]) ? $available_record_types[$new_uri] :
'';
1139 $record_types[$new_uri] = $record_name;
1143 $var_list[
'record_type_filter'] = $record_types;
1144 return ($asset->setAttrValue(
'dynamic_vars', $var_list));