advanced search: ShorthandExpansion TODOs list

SVN:b1312[5765]
This commit is contained in:
Bruno Da Silva
2018-05-02 12:19:38 +00:00
parent 81f7f9d70b
commit e508f645f3
2 changed files with 25 additions and 3 deletions

View File

@@ -841,6 +841,13 @@ class FalseExpression extends ScalarExpression
}
}
/**
* Class ExternalFieldExpression
*
* @todo verify if all required methods are implemented (ie: at first I missed the `Render` method, so DBObjectSearch::toOQL() result was wrong)
*
*/
class ExternalFieldExpression extends UnaryExpression
{
/**
@@ -869,14 +876,21 @@ class ExternalFieldExpression extends UnaryExpression
return $this->m_aFields;
}
/**
* used by DBObjectSearch::ShorthandExpansion(). it result in the ExternalFieldExpression being replaced by a FieldExpression mathching the final entry in self::$m_aFields
*
* @param array $aTranslationData
* @param bool $bMatchAll
* @param bool $bMarkFieldsAsResolved
*
* @return Expression|FieldExpression|UnaryExpression
*/
public function Translate($aTranslationData, $bMatchAll = true, $bMarkFieldsAsResolved = true)
{
$aFields = $this->GetFields();
$aLastField = end($aFields);
$oRet = new FieldExpression($aLastField['sAttCode'], $aLastField['sAlias']);
// $oRet->Translate($aTranslationData, $bMatchAll, $bMarkFieldsAsResolved);
return $oRet;
}