Added Missing Method
This commit is contained in:
parent
d2b032a4d1
commit
542ccf92d3
|
|
@ -980,4 +980,20 @@ abstract class AbstractType
|
|||
|
||||
return $offerLines;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check in loaded saleable.
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
public function checkInLoadedSaleableChecks($product, $callback)
|
||||
{
|
||||
static $loadedSaleableChecks = [];
|
||||
|
||||
if (array_key_exists($product->id, $loadedSaleableChecks)) {
|
||||
return $loadedSaleableChecks[$product->id];
|
||||
}
|
||||
|
||||
return $loadedSaleableChecks[$product->id] = $callback($product);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue