@@ -4,37 +4,37 @@ discard block |
||
| 4 | 4 | 'speckcatalog_image_mapper' => false, |
| 5 | 5 | ], |
| 6 | 6 | 'factories' => [ |
| 7 | - 'speckcatalog_category_service' => function ($sm) { |
|
| 7 | + 'speckcatalog_category_service' => function($sm) { |
|
| 8 | 8 | $service = new \SpeckCatalog\Service\Category; |
| 9 | 9 | $domain = $sm->get('multisite_domain_data'); |
| 10 | 10 | $service->setSiteId($domain['website_id']); |
| 11 | 11 | return $service->setSiteId($domain['website_id']); |
| 12 | 12 | }, |
| 13 | - 'speckcatalog_product_image_service' => function ($sm) { |
|
| 13 | + 'speckcatalog_product_image_service' => function($sm) { |
|
| 14 | 14 | $service = new \SpeckCatalog\Service\Image; |
| 15 | 15 | $mapper = $sm->get('speckcatalog_image_mapper')->setParentType('product'); |
| 16 | 16 | return $service->setEntityMapper($mapper); |
| 17 | 17 | }, |
| 18 | - 'speckcatalog_option_image_service' => function ($sm) { |
|
| 18 | + 'speckcatalog_option_image_service' => function($sm) { |
|
| 19 | 19 | $service = new \SpeckCatalog\Service\Image; |
| 20 | 20 | $mapper = $sm->get('speckcatalog_image_mapper')->setParentType('option'); |
| 21 | 21 | return $service->setEntityMapper($mapper); |
| 22 | 22 | }, |
| 23 | - 'speckcatalog_module_options' => function ($sm) { |
|
| 23 | + 'speckcatalog_module_options' => function($sm) { |
|
| 24 | 24 | $config = $sm->get('Config'); |
| 25 | 25 | return new \SpeckCatalog\Options\ModuleOptions(isset($config['speckcatalog']) ? $config['speckcatalog'] : []); |
| 26 | 26 | }, |
| 27 | - 'speckcatalog_availability_form' => function ($sm) { |
|
| 27 | + 'speckcatalog_availability_form' => function($sm) { |
|
| 28 | 28 | $form = new \SpeckCatalog\Form\Availability; |
| 29 | 29 | $form->setCompanyService($sm->get('speckcatalog_company_service')); |
| 30 | 30 | return $form->init(); |
| 31 | 31 | }, |
| 32 | - 'speckcatalog_product_form' => function ($sm) { |
|
| 32 | + 'speckcatalog_product_form' => function($sm) { |
|
| 33 | 33 | $form = new \SpeckCatalog\Form\Product; |
| 34 | 34 | $form->setCompanyService($sm->get('speckcatalog_company_service')); |
| 35 | 35 | return $form->init(); |
| 36 | 36 | }, |
| 37 | - 'speckcatalog_product_uom_form' => function ($sm) { |
|
| 37 | + 'speckcatalog_product_uom_form' => function($sm) { |
|
| 38 | 38 | $form = new \SpeckCatalog\Form\ProductUom; |
| 39 | 39 | $form->setUomService($sm->get('speckcatalog_uom_service')); |
| 40 | 40 | return $form->init(); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | 'speckcatalog_db' => 'Zend\Db\Adapter\Adapter', |
| 45 | 45 | ], |
| 46 | 46 | 'initializers' => [ |
| 47 | - function ($instance, $sm) { |
|
| 47 | + function($instance, $sm) { |
|
| 48 | 48 | if ($instance instanceof \SpeckCatalog\Mapper\DbAdapterAwareInterface) { |
| 49 | 49 | $dbAdapter = $sm->get('speckcatalog_db'); |
| 50 | 50 | $instance->setDbAdapter($dbAdapter); |
@@ -16,26 +16,26 @@ discard block |
||
| 16 | 16 | 'class' => 'SpeckCatalog\View\Helper\CssClass', |
| 17 | 17 | ], |
| 18 | 18 | 'factories' => [ |
| 19 | - 'speckCatalogProduct' => function ($sm) { |
|
| 19 | + 'speckCatalogProduct' => function($sm) { |
|
| 20 | 20 | $sm = $sm->getServiceLocator(); |
| 21 | 21 | $helper = new \SpeckCatalog\View\Helper\Product(); |
| 22 | 22 | $helper->setProductUomService($sm->get('speckcatalog_product_uom_service')); |
| 23 | 23 | return $helper; |
| 24 | 24 | }, |
| 25 | - 'speckCatalogAdderHelper' => function ($sm) { |
|
| 25 | + 'speckCatalogAdderHelper' => function($sm) { |
|
| 26 | 26 | $sm = $sm->getServiceLocator(); |
| 27 | 27 | $options = $sm->get('speckcatalog_module_options'); |
| 28 | 28 | $helper = new Helper\AdderHelper; |
| 29 | 29 | $helper->setPartialDir($options->getCatalogManagerPartialDir()); |
| 30 | 30 | return $helper; |
| 31 | 31 | }, |
| 32 | - 'speckCatalogOptionImageUploader' => function ($sm) { |
|
| 32 | + 'speckCatalogOptionImageUploader' => function($sm) { |
|
| 33 | 33 | $imageUploader = $sm->get('imageUploader'); |
| 34 | 34 | $element = ['name' => 'file_type', 'attributes' => ['value' => 'optionImage', 'type' => 'hidden']]; |
| 35 | 35 | $imageUploader->getForm()->add($element); |
| 36 | 36 | return $imageUploader; |
| 37 | 37 | }, |
| 38 | - 'speckCatalogManagerSideNav' => function ($sm) { |
|
| 38 | + 'speckCatalogManagerSideNav' => function($sm) { |
|
| 39 | 39 | $sm = $sm->getServiceLocator(); |
| 40 | 40 | $app = $sm->get('application'); |
| 41 | 41 | $routeMatch = $app->getMvcEvent()->getRouteMatch(); |
@@ -43,35 +43,35 @@ discard block |
||
| 43 | 43 | $helper->setRouteMatch($routeMatch); |
| 44 | 44 | return $helper; |
| 45 | 45 | }, |
| 46 | - 'speckCatalogProductImageUploader' => function ($sm) { |
|
| 46 | + 'speckCatalogProductImageUploader' => function($sm) { |
|
| 47 | 47 | $imageUploader = $sm->get('imageUploader'); |
| 48 | 48 | $element = ['name' => 'file_type', 'attributes' => ['value' => 'productImage', 'type' => 'hidden']]; |
| 49 | 49 | $imageUploader->getForm()->add($element); |
| 50 | 50 | return $imageUploader; |
| 51 | 51 | }, |
| 52 | - 'speckCatalogProductDocumentUploader' => function ($sm) { |
|
| 52 | + 'speckCatalogProductDocumentUploader' => function($sm) { |
|
| 53 | 53 | $uploader = $sm->get('imageUploader'); |
| 54 | 54 | $element = ['name' => 'file_type', 'attributes' => ['value' => 'productDocument', 'type' => 'hidden']]; |
| 55 | 55 | $uploader->getForm()->add($element); |
| 56 | 56 | return $uploader; |
| 57 | 57 | }, |
| 58 | - 'speckCatalogCategoryNav' => function ($sm) { |
|
| 58 | + 'speckCatalogCategoryNav' => function($sm) { |
|
| 59 | 59 | $sm = $sm->getServiceLocator(); |
| 60 | 60 | $helper = new Helper\CategoryNav; |
| 61 | 61 | return $helper->setCategoryService($sm->get('speckcatalog_category_service')); |
| 62 | 62 | }, |
| 63 | - 'speckCatalogImage' => function ($sm) { |
|
| 63 | + 'speckCatalogImage' => function($sm) { |
|
| 64 | 64 | $sm = $sm->getServiceLocator(); |
| 65 | 65 | $settings = $sm->get('speckcatalog_module_options'); |
| 66 | 66 | return new Helper\MediaUrl($settings, 'image'); |
| 67 | 67 | }, |
| 68 | - 'speckCatalogFeaturedProducts' => function ($sm) { |
|
| 68 | + 'speckCatalogFeaturedProducts' => function($sm) { |
|
| 69 | 69 | $speckFeaturedProducts = $sm->get('speckFeaturedProducts'); |
| 70 | 70 | return $speckFeaturedProducts->setTemplate('/speck-catalog/product/feature-clip'); |
| 71 | 71 | }, |
| 72 | 72 | ], |
| 73 | 73 | 'initializers' => [ |
| 74 | - function ($instance, $sm) { |
|
| 74 | + function($instance, $sm) { |
|
| 75 | 75 | if ($instance instanceof FormServiceAwareInterface) { |
| 76 | 76 | $sm = $sm->getServiceLocator(); |
| 77 | 77 | $formService = $sm->get('speckcatalog_form_service'); |
@@ -45,9 +45,9 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | public function find(array $data) |
| 47 | 47 | { |
| 48 | - $table = $this->getTableName(); |
|
| 48 | + $table = $this->getTableName(); |
|
| 49 | 49 | if (isset($data['product_id'])) { |
| 50 | - $where = ['product_id' => $data['product_id']]; |
|
| 50 | + $where = ['product_id' => $data['product_id']]; |
|
| 51 | 51 | } else { |
| 52 | 52 | $where = ['item_number' => $data['item_number']]; |
| 53 | 53 | } |
@@ -152,10 +152,10 @@ discard block |
||
| 152 | 152 | |
| 153 | 153 | $select = $this->getSelect($c_b_p) |
| 154 | 154 | ->columns(['product_id', 'choice_id', 'option_id']) |
| 155 | - ->join($c_p_o, $c_p_o.'.option_id='.$c_b_p.'.option_id', []) |
|
| 155 | + ->join($c_p_o, $c_p_o . '.option_id=' . $c_b_p . '.option_id', []) |
|
| 156 | 156 | ->where([ |
| 157 | - $c_b_p.'.product_id' => $builderProductId, |
|
| 158 | - $c_p_o.'.product_id' => $productId, |
|
| 157 | + $c_b_p . '.product_id' => $builderProductId, |
|
| 158 | + $c_p_o . '.product_id' => $productId, |
|
| 159 | 159 | ]); |
| 160 | 160 | $rows = $this->selectMany($select); |
| 161 | 161 | |
@@ -15,13 +15,13 @@ |
||
| 15 | 15 | public function __construct(array $config = []) |
| 16 | 16 | { |
| 17 | 17 | if (count($config)) { |
| 18 | - $this->parentOptionId = isset($config['parent_option_id']) ? $config['parent_option_id'] : null; |
|
| 19 | - $this->productId = isset($config['product_id']) ? $config['product_id'] : null; |
|
| 20 | - $this->itemNumber = isset($config['item_number']) ? $config['item_number'] : null; |
|
| 18 | + $this->parentOptionId = isset($config['parent_option_id']) ? $config['parent_option_id'] : null; |
|
| 19 | + $this->productId = isset($config['product_id']) ? $config['product_id'] : null; |
|
| 20 | + $this->itemNumber = isset($config['item_number']) ? $config['item_number'] : null; |
|
| 21 | 21 | $this->parentOptionName = isset($config['parent_option_name']) ? $config['parent_option_name'] : null; |
| 22 | - $this->flatOptions = isset($config['flat_options']) ? $config['flat_options'] : []; |
|
| 23 | - $this->image = isset($config['image']) ? $config['image'] : null; |
|
| 24 | - $this->uom = isset($config['uom']) ? $config['uom'] : null; |
|
| 22 | + $this->flatOptions = isset($config['flat_options']) ? $config['flat_options'] : []; |
|
| 23 | + $this->image = isset($config['image']) ? $config['image'] : null; |
|
| 24 | + $this->uom = isset($config['uom']) ? $config['uom'] : null; |
|
| 25 | 25 | } |
| 26 | 26 | } |
| 27 | 27 | |