public static function checkAndSendNotifyEmail()
 {
     $config = Utility::getConfig();
     $translator = Utility::translate();
     $doctrine = self::$servicelocator->get('doctrine');
     $menuStoreModel = new menuStoreModel($doctrine);
     $menuStore = $menuStoreModel->findAll();
     foreach ($menuStore as $store) {
         $store = $menuStoreModel->findOneBy(array('id' => $store->getId()));
         if ($store->getOutOfStock() == -1) {
             $outOfStock = $config['out_of_stock'];
         } else {
             $outOfStock = $store->getOutOfStock();
         }
         $compare = self::getMenuItemQuantityInStore($store->getId());
         $data = array('name' => $store->getName(), 'inStore' => $compare, 'unit' => $store->getUnit());
         $subject = $translator->translate('Out of stock');
         $receiveEmail = $config['emailId'];
         if ($compare < $outOfStock) {
             Utility::sendEmail('emptystore', $data, $subject, $receiveEmail, true);
         }
     }
 }