Ejemplo n.º 1
0
 public static function MakeModifierProperties($oFilter)
 {
     // Compute query modifiers properties (can be set in the search itself, by the context, etc.)
     //
     $aModifierProperties = array();
     foreach (MetaModel::EnumPlugins('iQueryModifier') as $sPluginClass => $oQueryModifier) {
         // Lowest precedence: the application context
         $aPluginProps = ApplicationContext::GetPluginProperties($sPluginClass);
         // Highest precedence: programmatically specified (or OQL)
         foreach ($oFilter->GetModifierProperties($sPluginClass) as $sProp => $value) {
             $aPluginProps[$sProp] = $value;
         }
         if (count($aPluginProps) > 0) {
             $aModifierProperties[$sPluginClass] = $aPluginProps;
         }
     }
     return $aModifierProperties;
 }