Skip to content
Permalink
Browse files

Merge pull request #200 from flack/Dev

handler url can now be overwritten in config
  • Loading branch information...
flack committed Apr 16, 2019
2 parents 4f57543 + 9e3a221 commit 35e176679675f9ab53ea8bd5ffbaf642abc8be26
Showing with 1 addition and 3 deletions.
  1. +1 −3 src/midcom/datamanager/extension/type/autocompleteType.php
@@ -50,6 +50,7 @@ public function configureOptions(OptionsResolver $resolver)
'categorize_by_parent_label' => false,
'searchfields' => [],
'min_chars' => 2,
'handler_url' => midcom_connection::get_url('self') . 'midcom-exec-midcom.datamanager/autocomplete.php',
'sortable' => false,
'clever_class' => null
];
@@ -122,8 +123,6 @@ public function buildForm(FormBuilderInterface $builder, array $options)
*/
public function finishView(FormView $view, FormInterface $form, array $options)
{
$handler_url = midcom_connection::get_url('self') . 'midcom-exec-midcom.datamanager/autocomplete.php';
$preset = [];
if (!empty($view->children['selection']->vars['data'])) {
foreach (array_filter((array) $view->children['selection']->vars['data']) as $identifier) {
@@ -140,7 +139,6 @@ public function finishView(FormView $view, FormInterface $form, array $options)
}
$handler_options = array_replace([
'handler_url' => $handler_url,
'method' => $options['type_config']['method'],
'allow_multiple' => $options['type_config']['allow_multiple'],
'preset' => $preset,

0 comments on commit 35e1766

Please sign in to comment.
You can’t perform that action at this time.