Пример #1
0
 /**
  * @param \Magento\UrlRewrite\Service\V1\Data\UrlRewriteFactory $urlRewriteFactory
  * @param DataObjectHelper $dataObjectHelper
  * @param \Magento\Framework\App\Resource $resource
  */
 public function __construct(UrlRewriteFactory $urlRewriteFactory, DataObjectHelper $dataObjectHelper, Resource $resource)
 {
     $this->connection = $resource->getConnection(Resource::DEFAULT_WRITE_RESOURCE);
     $this->resource = $resource;
     parent::__construct($urlRewriteFactory, $dataObjectHelper);
 }
Пример #2
0
 /**
  * @param \Magento\UrlRewrite\Service\V1\Data\UrlRewriteFactory $urlRewriteFactory
  * @param DataObjectHelper $dataObjectHelper
  * @param \Magento\Framework\App\ResourceConnection $resource
  */
 public function __construct(UrlRewriteFactory $urlRewriteFactory, DataObjectHelper $dataObjectHelper, ResourceConnection $resource)
 {
     $this->connection = $resource->getConnection();
     $this->resource = $resource;
     parent::__construct($urlRewriteFactory, $dataObjectHelper);
 }