/** * 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; }
/** * 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); } }
/** * 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); }
/** * Open tab. * * @param string $tabName * @return Tab */ public function openTab($tabName) { parent::openTab($tabName); $this->getTemplateBlock()->waitLoader(); return $this; }
/** * Get data of Category information. * * @param CatalogCategory $category * @return array */ public function getDataCategory(CatalogCategory $category) { return $category->hasData() ? parent::getData($category) : parent::getData(); }
/** * 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; }