Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CatalogCategoryLink.php
Go to the documentation of this file.
1 <?php
8 
11 use Magento\Mtf\Client\Locator;
12 
17 {
23  protected $cmsCategoryLink = './ancestor::body//*[contains(@id, "responseCntoptions_fieldset")]';
24 
31  protected function selectEntity(array $entities)
32  {
33  foreach ($entities['value'] as $entity) {
34  $this->_rootElement->find($this->selectEntity)->click();
35  $this->getTemplateBlock()->waitLoader();
37  $catalogCategoryLinkForm = $this->blockFactory->create(
38  Form::class,
39  ['element' => $this->_rootElement->find($this->cmsCategoryLink, Locator::SELECTOR_XPATH)]
40  );
41  $elementNew = $this->_rootElement->find($this->cmsCategoryLink, Locator::SELECTOR_XPATH);
42  $entities['value'] = $entity->getPath() . '/' . $entity->getName();
43  $categoryFields['entities'] = $entities;
44  $catalogCategoryLinkForm->_fill($categoryFields, $elementNew);
45  $this->getTemplateBlock()->waitLoader();
46  }
47  }
48 }
$entity
Definition: element.phtml:22