Eccube\Entity\Product::getCodeMin PHP Method

getCodeMin() public method

Get Product_code min
public getCodeMin ( ) : integer
return integer
    public function getCodeMin()
    {
        $this->_calc();
        $codes = array();
        foreach ($this->codes as $code) {
            if (!is_null($code)) {
                $codes[] = $code;
            }
        }
        return count($codes) ? min($codes) : null;
    }

Usage Example

 /**
  * {@inheritDoc}
  */
 public function getCodeMin()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getCodeMin', array());
     return parent::getCodeMin();
 }