_objectManager = $objectManager; } /** * Create action * * @param string $actionName * @return ActionInterface * @throws \InvalidArgumentException */ public function create($actionName) { if (!is_subclass_of($actionName, \Magento\Framework\App\ActionInterface::class)) { throw new \InvalidArgumentException( 'The action name provided is invalid. Verify the action name and try again.' ); } return $this->_objectManager->create($actionName); } }