Example #1
0
 /**
  * Add an object to the collection
  *
  * @param \Magento\Framework\Object $object
  * @return $this
  * @throws LocalizedException
  */
 public function addItem(\Magento\Framework\Object $object)
 {
     if (!$object instanceof $this->_itemObjectClass) {
         throw new LocalizedException(__('Attempt to add an invalid object'));
     }
     return parent::addItem($object);
 }