email: is read and is important filters
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user