/** * 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); } }
/** * Get data of Category information. * * @param CatalogCategory $category * @return array */ public function getDataCategory(CatalogCategory $category) { return $category->hasData() ? parent::getData($category) : parent::getData(); }
/** * Get data of the tabs. * * @param FixtureInterface|null $product * @param Element|null $element * @return array */ public function getData(FixtureInterface $product = null, Element $element = null) { $data = parent::getData($product, $element); if ($this->isWebsiteTabVisible() && !isset($data['website_ids'])) { $data['website_ids'] = $this->getWebsiteTabData(); } return $data; }