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
7 
9 {
13  protected $objectManager;
14 
19  {
20  $this->objectManager = $objectManager;
21  }
22 
31  public function create($className, $arguments = [])
32  {
33  $action = $this->objectManager->create($className, $arguments);
34  if (!$action instanceof ActionInterface) {
35  throw new \InvalidArgumentException(
36  $className . ' doesn\'t implement \Magento\Framework\Indexer\ActionInterface'
37  );
38  }
39 
40  return $action;
41  }
42 }
__construct(\Magento\Framework\ObjectManagerInterface $objectManager)
$arguments
create($className, $arguments=[])
if($currentSelectedMethod==$_code) $className
Definition: form.phtml:31