當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Operation::getCategory方法代碼示例

本文整理匯總了PHP中Operation::getCategory方法的典型用法代碼示例。如果您正苦於以下問題:PHP Operation::getCategory方法的具體用法?PHP Operation::getCategory怎麽用?PHP Operation::getCategory使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Operation的用法示例。


在下文中一共展示了Operation::getCategory方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _makeMessage

 /**
  * Полное сообщение с описанием операции (для email)
  *
  * @param  Operation $operation
  * @return Swift_Message
  */
 private function _makeMessage(Operation $operation)
 {
     $from = array(sfConfig::get('app_notification_email_from') => sfConfig::get('app_notification_email_name'));
     $to = $operation->getUser()->getUserMail();
     $subject = "Easyfinance.ru - напоминание об операции";
     $body = sprintf($this->_template, $operation->getDateTimeObject('date')->format('d.m.y'), $operation->getCategory()->getName(), $operation->getAccount()->getName(), abs($operation->getAmount()), $operation->getAccount()->getCurrency()->getCode(), $operation->getComment());
     return $this->_mailer->compose($from, $to, $subject, $body);
 }
開發者ID:ru-easyfinance,項目名稱:EasyFinance,代碼行數:14,代碼來源:myNotificationHandlerEmail.php

示例2: setOperation

 public function setOperation(Operation $operation)
 {
     $this->_levelValues["parentCategory"] = $operation->getCategory()->getParentCategory();
     $this->_levelValues["category"] = $operation->getCategory();
     $tags = array_map('trim', explode(',', $operation->getTags()));
     $tag = isset($tags[0]) ? $tags[0] : null;
     $this->_levelValues["tag"] = $tag;
     $this->amount = $operation->getAmountForBudget($this->currency, true);
 }
開發者ID:ru-easyfinance,項目名稱:EasyFinance,代碼行數:9,代碼來源:ReportMatrix.class.php

示例3: _makeMessage

 /**
  * Сообщение вида:
  * ДАТА, СУММА ВАЛЮТА, КАТЕГОРИЯ, СЧЕТ, КОММЕНТАРИЙ
  *
  * @param  Operation $operation
  * @return string
  */
 private function _makeMessage($operation)
 {
     $words = array($operation->getDateTimeObject('date')->format('d.m'), abs($operation->getAmount()) . ' ' . $operation->getAccount()->getCurrency()->getCode(), (string) strip_tags($operation->getCategory()->getName()), (string) strip_tags($operation->getAccount()->getName()), strip_tags($operation->getComment()));
     return $this->_fixMessageLenth($words);
 }
開發者ID:ru-easyfinance,項目名稱:EasyFinance,代碼行數:12,代碼來源:myNotificationHandlerSms.php


注:本文中的Operation::getCategory方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。