Price.php 406 B

12345678910111213141516171819202122
  1. <?php
  2. namespace common\libs\dataList\column;
  3. use common\helpers\Tool;
  4. class Price extends AbstractColumn implements InterfaceColumn {
  5. public function __construct($config = []) {
  6. parent::__construct($config);
  7. }
  8. public function result(){
  9. $value = $this->getValue();
  10. if(!$value){
  11. return '0.00';
  12. }
  13. return Tool::formatPrice($value);
  14. }
  15. }