Пример #1
0
 /**
  * Get data of Customer information, addresses on tabs.
  *
  * @param Customer $customer
  * @param Address|Address[]|null $address
  * @return array
  */
 public function getDataCustomer(Customer $customer, $address = null)
 {
     $data = ['customer' => $customer->hasData() ? parent::getData($customer) : parent::getData()];
     if (null !== $address) {
         $this->openTab('addresses');
         $data['addresses'] = $this->getTabElement('addresses')->getDataAddresses($address);
     }
     return $data;
 }
Пример #2
0
 /**
  * Get data of the tabs.
  *
  * @param InjectableFixture|null $fixture
  * @param Element|null $element
  * @return array
  */
 public function getData(InjectableFixture $fixture = null, Element $element = null)
 {
     $widgetType = $fixture->getWidgetOptions()['type_id'];
     if ($this->hasRender($widgetType)) {
         return $this->callRender($widgetType, 'getData', ['InjectableFixture' => $fixture, 'Element' => $element]);
     } else {
         return parent::getData($fixture, $element);
     }
 }
Пример #3
0
 /**
  * Fill form with tabs.
  *
  * @param FixtureInterface $cms
  * @param Element|null $element
  * @return FormTabs
  */
 public function fill(FixtureInterface $cms, Element $element = null)
 {
     $this->fillStoreView($cms);
     return parent::fill($cms, $element);
 }
Пример #4
0
 /**
  * Open tab.
  *
  * @param string $tabName
  * @return Tab
  */
 public function openTab($tabName)
 {
     parent::openTab($tabName);
     $this->getTemplateBlock()->waitLoader();
     return $this;
 }
Пример #5
0
 /**
  * Get data of Category information.
  *
  * @param CatalogCategory $category
  * @return array
  */
 public function getDataCategory(CatalogCategory $category)
 {
     return $category->hasData() ? parent::getData($category) : parent::getData();
 }
Пример #6
0
 /**
  * Open product tab.
  *
  * @param string $tabName
  * @return Tab
  */
 public function openTab($tabName)
 {
     $this->_rootElement->find($this->productInfo)->click();
     parent::openTab($tabName);
     $this->getTemplateBlock()->waitLoader();
     return $this;
 }