当前位置: 首页>>代码示例>>PHP>>正文


PHP FixtureInterface::getCode方法代码示例

本文整理汇总了PHP中Magento\Mtf\Fixture\FixtureInterface::getCode方法的典型用法代码示例。如果您正苦于以下问题:PHP FixtureInterface::getCode方法的具体用法?PHP FixtureInterface::getCode怎么用?PHP FixtureInterface::getCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Magento\Mtf\Fixture\FixtureInterface的用法示例。


在下文中一共展示了FixtureInterface::getCode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: fill

 /**
  * Fill the root form
  *
  * @param FixtureInterface $fixture
  * @param SimpleElement|null $element
  * @return $this
  */
 public function fill(FixtureInterface $fixture, SimpleElement $element = null)
 {
     $element = $this->_rootElement->find(sprintf($this->currencyRow, $fixture->getCode()), Locator::SELECTOR_XPATH);
     $data = $fixture->getData();
     unset($data['code']);
     $mapping = $this->dataMapping($data);
     $this->_fill($mapping, $element);
     return $this;
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:16,代码来源:CurrencySymbolForm.php

示例2: persist

 /**
  * Post request for creating widget instance.
  *
  * @param FixtureInterface $fixture [optional]
  * @throws \Exception
  * @return array
  */
 public function persist(FixtureInterface $fixture = null)
 {
     $code = $this->mappingData['code'][$fixture->getCode()];
     $themeId = $this->getThemeId($fixture->getThemeId());
     $data = $this->prepareData($fixture);
     $url = $_ENV['app_backend_url'] . 'admin/widget_instance/save/code/' . $code . '/theme_id/' . $themeId;
     $curl = new BackendDecorator(new CurlTransport(), $this->_configuration);
     $curl->write($url, $data);
     $response = $curl->read();
     $curl->close();
     if (!strpos($response, 'data-ui-id="messages-message-success"')) {
         throw new \Exception("Widget instance creation by curl handler was not successful! Response: {$response}");
     }
     $id = null;
     if (preg_match_all('/\\/widget_instance\\/edit\\/instance_id\\/(\\d+)/', $response, $matches)) {
         $id = $matches[1][count($matches[1]) - 1];
     }
     return ['id' => $id];
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:26,代码来源:Curl.php

示例3: fill

 /**
  * Fill the root form
  *
  * @param FixtureInterface $fixture
  * @param SimpleElement|null $element
  * @return $this
  */
 public function fill(FixtureInterface $fixture, SimpleElement $element = null)
 {
     $element = $this->_rootElement->find(sprintf($this->currencyRow, $fixture->getCode()), Locator::SELECTOR_XPATH);
     return parent::fill($fixture, $element);
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:12,代码来源:CurrencySymbolForm.php


注:本文中的Magento\Mtf\Fixture\FixtureInterface::getCode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。