Invalid category vars
at line 388 in file classes/Link.php
383. if (is_array($category) && isset($category['id_category'])) {
384. $category = new Category($category, $idLang);
385. } elseif ((int) $category) {
386. $category = new Category((int) $category, $idLang);
387. } else {
388. throw new PrestaShopException('Invalid category vars');
389. }
390. }
391.
392. return $category;
393. }
436. $rule = 'layered_rule';
437. $params['selected_filters'] = $selectedFilters;
438. }
439.
440. if (!$alias) {
441. $category = $this->getCategoryObject($category, $idLang);
442. }
443. $params['rewrite'] = (!$alias) ? $category->link_rewrite : $alias;
444. if ($dispatcher->hasKeyword($rule, $idLang, 'meta_keywords', $idShop)) {
445. $category = $this->getCategoryObject($category, $idLang);
446. $params['meta_keywords'] = Tools::str2url($category->getFieldByLang('meta_keywords'));
Argument [0] Argument [1] 1
317.
318. if ($format === 'sitemap') {
319. return array(
320. 'id' => 'category-page-' . (int) $this->id,
321. 'label' => $this->name,
322. 'url' => Context::getContext()->link->getCategoryLink($this->id, $this->link_rewrite),
323. 'children' => $children,
324. );
325. }
326.
327. return array(
Argument [0] Argument [1]
300. foreach ($subcats as &$subcat) {
301. if (!$subcat['id_category']) {
302. break;
303. } elseif (!is_array($excludedIdsArray) || !in_array($subcat['id_category'], $excludedIdsArray)) {
304. $categ = new Category($subcat['id_category'], $idLang);
305. $children[] = $categ->recurseLiteCategTree($maxDepth, $currentDepth + 1, $idLang, $excludedIdsArray, $format);
306. }
307. }
308. }
309.
310. if (is_array($this->description)) {
Argument [0] 0 Argument [1] 1 Argument [2] 1 Argument [3] Argument [4] sitemap
53. $this->setTemplate('cms/sitemap');
54. }
55.
56. public function getCategoriesLinks()
57. {
58. return array(Category::getRootCategory()->recurseLiteCategTree(0, 0, null, null, 'sitemap'));
59. }
60.
61. /**
62. * @return array
63. */
Argument [0] 0 Argument [1] 0 Argument [2] 1 Argument [3] Argument [4] sitemap
42. 'pages' => $this->trans('Pages', array(), 'Shop.Theme.Catalog'),
43. 'links' => array(
44. 'offers' => $this->getOffersLinks(),
45. 'pages' => $this->getPagesLinks(),
46. 'user_account' => $this->getUserAccountLinks(),
47. 'categories' => $this->getCategoriesLinks(),
48. ),
49. )
50. );
51.
52. parent::initContent();
287. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
288. $this->initHeader();
289. }
290.
291. if ($this->viewAccess()) {
292. $this->initContent();
293. } else {
294. $this->errors[] = $this->trans('Access denied.', array(), 'Admin.Notifications.Error');
295. }
296.
297. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {
510. if (isset($params_hook_action_dispatcher)) {
511. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
512. }
513.
514. // Running controller
515. $controller->run();
516.
517. // Execute hook dispatcher after
518. if (isset($params_hook_action_dispatcher)) {
519. Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);
520. }
23. * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
24. * International Registered Trademark & Property of PrestaShop SA
25. */
26.
27. require dirname(__FILE__).'/config/config.inc.php';
28. Dispatcher::getInstance()->dispatch();