email: is read and is important filters

This commit is contained in:
yuri
2016-01-15 13:24:06 +02:00
parent 9b9a472dd5
commit f148bb0089
3 changed files with 42 additions and 0 deletions
@@ -792,6 +792,18 @@ class Base
{
$part = array();
if (!empty($item['field']) && !empty($item['type'])) {
$methodName = 'getWherePart' . ucfirst($item['field']) . ucfirst($item['type']);
if (method_exists($this, $methodName)) {
$value = null;
if (!empty($item['value'])) {
$value = $item['value'];
}
return $this->$methodName($value);
}
}
if (!empty($item['dateTime'])) {
return $this->convertDateTimeWhere($item);
}
@@ -2,6 +2,8 @@
"account",
"dateSent",
"emailAddress",
"isRead",
"isImportant",
"name",
"status",
"parent",
+28
View File
@@ -267,5 +267,33 @@ class Email extends \Espo\Core\SelectManagers\Base
}
}
protected function getWherePartIsReadIsTrue()
{
return array(
'usersMiddle.isRead' => true
);
}
protected function getWherePartIsReadIsFalse()
{
return array(
'usersMiddle.isRead' => false
);
}
protected function getWherePartIsImportantIsTrue()
{
return array(
'usersMiddle.isImportant' => true
);
}
protected function getWherePartIsImportantIsFalse()
{
return array(
'usersMiddle.isImportant' => false
);
}
}