Advertisement
Guest User

Untitled

a guest
Jan 31st, 2013
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1. <?php
  2.  
  3. class SpecEnergyStar extends SpecSelectYesNo
  4. {
  5.     protected $name = 'Energy Star';
  6.     protected $filter = array(SpecFilter::_LABELWRITER_, SpecFilter::_DOTMATRIX_);
  7.  
  8.     public function __construct($key = false, $index = 1, $value1key = false)
  9.     {
  10.         $this->category = SpecCategory::_GENERAL_;
  11.         parent::__construct($key, $index, $value1key);
  12.     }
  13.  
  14.     public function getOrder(Product $product)
  15.     {
  16.         if ($product->isLabelWriter()) return 560;
  17.         if ($product->isDotMatrixPrinter()) return 1150;
  18.         return parent::getOrder($product);
  19.     }
  20.  
  21.     public function getTraffic(Product $product)
  22.     {
  23.         if ( $product->isDotMatrixPrinter() ) return self::TRAFFIC_RED;
  24.         return parent::getTraffic($product);
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement