_objectManager = $objectManager; } /** * Create new config object * * @param string $type * @return CommentInterface * @throws \InvalidArgumentException */ public function create($type) { $commentModel = $this->_objectManager->create($type); if (!$commentModel instanceof CommentInterface) { throw new \InvalidArgumentException('Incorrect comment model provided'); } return $commentModel; } }