Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Input type of sourcefilter/setSourceFilter


Reply


907 Views

Avatar
Martijn

Community Member, 271 Posts

30 August 2010 at 11:27pm

Hi,

I want to use DataObjectManager as a ResultsTable in ModelAdmin.

This works fine, until I close the popup, then the all the items returns in the TableList without applying my ModelAdmin searchcriteria.

I tried to use $tf->setSoureFilter($filter); , but I need to convert the ResultAssembly from ModelAdmin to a format that DOM can pick up after the refresh.

In the method loadSourceFilter() there is this part:

if(!empty($this->filter)) {
         $break = strpos($this->filter, "_");
         $field = substr($this->filter, 0, $break);
         $value = substr($this->filter, $break+1, strlen($this->filter) - strlen($field));
         $filter_string = $field . "='$value'";
      }   

But I don't quite understand what the input needs to be.

The format of the querystring from ModelAdmin is like this:

ResultsForm?Title=test&ResultAssembly%5BTitle%5D=Title

What's the correct input for DataObjectManager->setSourceFilter($filter); so I can convert the ModelAdmin ResultsAssembly to a DataObjectManager format?

Thanks in advance.