Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ActionFactory.php
Go to the documentation of this file.
1 <?php
9 namespace Magento\Framework\App;
10 
16 {
20  protected $_objectManager;
21 
26  {
27  $this->_objectManager = $objectManager;
28  }
29 
37  public function create($actionName)
38  {
39  if (!is_subclass_of($actionName, \Magento\Framework\App\ActionInterface::class)) {
40  throw new \InvalidArgumentException(
41  'The action name provided is invalid. Verify the action name and try again.'
42  );
43  }
44  return $this->_objectManager->create($actionName);
45  }
46 }
is_subclass_of($obj, $className)
$objectManager
Definition: bootstrap.php:17
__construct(\Magento\Framework\ObjectManagerInterface $objectManager)