Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
UrlGeneratorFactory.php
Go to the documentation of this file.
1 <?php
7 
15 {
19  protected $_objectManager;
20 
25  {
26  $this->_objectManager = $objectManager;
27  }
28 
37  public function createUrlGenerator($generatorClassName, array $arguments = [])
38  {
39  $rowUrlGenerator = $this->_objectManager->create($generatorClassName, $arguments);
40  if (false === $rowUrlGenerator instanceof \Magento\Backend\Model\Widget\Grid\Row\GeneratorInterface) {
41  throw new \InvalidArgumentException('Passed wrong parameters');
42  }
43 
44  return $rowUrlGenerator;
45  }
46 }
$objectManager
Definition: bootstrap.php:17
createUrlGenerator($generatorClassName, array $arguments=[])
__construct(\Magento\Framework\ObjectManagerInterface $objectManager)
$arguments