1:<?php 2: 3:class ManufacturerController extends ManufacturerControllerCore 4:{ 5: protected function assignOne() 6: { 7: $this->manufacturer->description = Tools::nl2br(trim($this->manufacturer->description)); 8: $nbProducts = $this->manufacturer->getProducts($this->manufacturer->id, null, null, null, $this->orderBy, $this->orderWay, true); 9: $this->pagination((int) $nbProducts); 10: 11: $products = $this->manufacturer->getProducts($this->manufacturer->id, $this->context->language->id, (int) $this->p, (int) $this->n, $this->orderBy, $this->orderWay); 12: $this->addColorsToProductList($products); 13: 14: $mpdfdir = _PS_BASE_URL_.__PS_BASE_URI__.'img/m/pdfs/'.$this->manufacturer->id; 15: $mpdf = array_diff(scandir(_PS_MANU_IMG_DIR_.'pdfs/'.$this->manufacturer->id),array('.', '..')); 16: $this->context->smarty->assign( 17: [ 18: 'nb_products' => $nbProducts, 19: 'products' => $products, 20: 'path' => ($this->manufacturer->active ? Tools::safeOutput($this->manufacturer->name) : ''), 21: 'manufacturer' => $this->manufacturer, 22: 'mpdfdir' => $mpdfdir, 23: 'mpdf' => $mpdf, 24: 'comparator_max_item' => Configuration::get('PS_COMPARATOR_MAX_ITEM'), 25: 'body_classes' => [$this->php_self.'-'.$this->manufacturer->id, $this->php_self.'-'.$this->manufacturer->link_rewrite], 26: ] 27: ); 28: } 29:}