Implemented the capability to modify queries by the mean of a plugin (beta)

SVN:1.2[1840]
This commit is contained in:
Romain Quetiez
2012-02-03 17:16:27 +00:00
parent e623467782
commit 493ab80965
8 changed files with 286 additions and 75 deletions

View File

@@ -66,6 +66,12 @@ class DBObjectSearch
$this->m_aRelatedTo = array();
$this->m_bDataFiltered = false;
$this->m_aParentConditions = array();
$this->m_aModifierProperties = array();
foreach (MetaModel::EnumPlugins('iQueryModifier') as $sPluginClass => $oQueryModifier)
{
$this->m_aModifierProperties[$sPluginClass] = ApplicationContext::GetPluginProperties($sPluginClass);
}
}
public function AllowAllData() {$this->m_bAllowAllData = true;}
@@ -126,6 +132,23 @@ class DBObjectSearch
}
public function SetModifierProperty($sPluginClass, $sProperty, $value)
{
$this->m_aModifierProperties[$sPluginClass][$sProperty] = $value;
}
public function GetModifierProperties($sPluginClass)
{
if (array_key_exists($sPluginClass, $this->m_aModifierProperties))
{
return $this->m_aModifierProperties[$sPluginClass];
}
else
{
return array();
}
}
public function IsAny()
{
// #@# todo - if (!$this->m_oSearchCondition->IsTrue()) return false;