Ejemplo n.º 1
0
 /**
  * @inheritdoc
  *
  * @SuppressWarnings(PHPMD.ExcessiveParameterList)
  */
 public function __construct(\Magento\Framework\UrlInterface $url, \Praxigento\Core\Repo\Query\Criteria\IAdapter $critAdapter, \Praxigento\Core\Repo\Query\Criteria\IMapper $api2sqlMapper = null, \Praxigento\Core\Repo\ICrud $repo, \Magento\Framework\View\Element\UiComponent\DataProvider\Reporting $reporting, \Magento\Framework\Api\Search\SearchCriteriaBuilder $searchCritBuilder, \Magento\Framework\App\RequestInterface $request, \Magento\Framework\Api\FilterBuilder $filterBuilder, $name, array $meta = [], array $data = [])
 {
     /* add default Update URL */
     if (!isset($data[static::UIC_CONFIG][static::UIC_UPDATE_URL])) {
         $val = $url->getRouteUrl(static::UICD_UPDATE_URL);
         $data[static::UIC_CONFIG][static::UIC_UPDATE_URL] = $val;
     }
     parent::__construct($name, 'entity_id', 'id', $reporting, $searchCritBuilder, $request, $filterBuilder, $meta, $data);
     /* post construction setup */
     $this->_criteriaAdapter = $critAdapter;
     $this->_api2sqlMapper = $api2sqlMapper;
     $this->_repo = $repo;
 }
Ejemplo n.º 2
0
 /**
  * Note: isolation flushes the URL memory cache
  * @magentoAppIsolation enabled
  */
 public function testGetRouteUrl()
 {
     $this->assertEquals('http://localhost/index.php/', $this->_model->getRouteUrl());
     $this->assertEquals('http://localhost/index.php/catalog/product/view/id/50/', $this->_model->getRouteUrl('catalog/product/view', array('id' => 50)));
     $this->assertEquals('http://localhost/index.php/fancy_uri', $this->_model->getRouteUrl('core/index/index', array('_direct' => 'fancy_uri')));
 }