- /**
- * Get notifications grouped by severity
- *
- * @param \Magento\AdminNotification\Model\Inbox $object
- * @return array
- * @SuppressWarnings(PHPMD.UnusedFormalParameter)
- */
- public function getNoticeStatus(\Magento\AdminNotification\Model\Inbox $object)
- {
- $connection = $this->getConnection();
- $select = $connection->select()->from(
- $this->getMainTable(),
- [
- 'severity' => 'severity',
- 'count_notice' => new \Zend_Db_Expr('COUNT(' . $this->getIdFieldName() . ')')
- ]
- )->group(
- 'severity'
- )->where(
- 'is_remove=?',
- 0
- )->where(
- 'is_read=?',
- 0
- );
- $return = $connection->fetchPairs($select);
- return $return;
- }