本文整理汇总了PHP中JSFactory::getAliasManufacturer方法的典型用法代码示例。如果您正苦于以下问题:PHP JSFactory::getAliasManufacturer方法的具体用法?PHP JSFactory::getAliasManufacturer怎么用?PHP JSFactory::getAliasManufacturer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JSFactory
的用法示例。
在下文中一共展示了JSFactory::getAliasManufacturer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: jshoppingParseRoute
//.........这里部分代码省略.........
return $vars;
}
if ($menuItem->query['controller'] == "user" && $menuItem->query['task'] == "") {
$vars['controller'] = "user";
$vars['task'] = $segments[0];
$dispatcher->trigger('onAfterParseRoute', array(&$vars, &$segments));
return $vars;
}
if ($menuItem->query['controller'] == "checkout") {
$vars['controller'] = "checkout";
$vars['task'] = $segments[0];
$dispatcher->trigger('onAfterParseRoute', array(&$vars, &$segments));
return $vars;
}
if ($menuItem->query['controller'] == "vendor" && $menuItem->query['task'] == "") {
$vars['controller'] = "vendor";
$vars['task'] = $segments[0];
$dispatcher->trigger('onAfterParseRoute', array(&$vars, &$segments));
return $vars;
}
if ($menuItem->query['controller'] == "content" && $menuItem->query['task'] == "view") {
$vars['controller'] = "content";
$vars['page'] = $segments[0];
$dispatcher->trigger('onAfterParseRoute', array(&$vars, &$segments));
return $vars;
}
if ($menuItem->query['controller'] == "category" && $menuItem->query['category_id'] && $segments[1] == "") {
$prodalias = JSFactory::getAliasProduct();
$product_id = array_search($segments[0], $prodalias, true);
if (!$product_id) {
JError::raiseError(404, _JSHOP_PAGE_NOT_FOUND);
}
$vars['controller'] = "product";
$vars['task'] = "view";
$vars['category_id'] = $menuItem->query['category_id'];
$vars['product_id'] = $product_id;
$dispatcher->trigger('onAfterParseRoute', array(&$vars, &$segments));
return $vars;
}
}
if ($segments[0] && !in_array($segments[0], $reservedFirstAlias)) {
$catalias = JSFactory::getAliasCategory();
$category_id = array_search($segments[0], $catalias, true);
if ($category_id && $segments[1] == "") {
$vars['controller'] = "category";
$vars['task'] = "view";
$vars['category_id'] = $category_id;
$dispatcher->trigger('onAfterParseRoute', array(&$vars, &$segments));
return $vars;
}
if ($category_id && $segments[1] != "") {
$prodalias = JSFactory::getAliasProduct();
$product_id = array_search($segments[1], $prodalias, true);
if (!$product_id) {
JError::raiseError(404, _JSHOP_PAGE_NOT_FOUND);
}
if ($category_id && $product_id) {
$vars['controller'] = "product";
$vars['task'] = "view";
$vars['category_id'] = $category_id;
$vars['product_id'] = $product_id;
$dispatcher->trigger('onAfterParseRoute', array(&$vars, &$segments));
return $vars;
}
}
if (!$category_id && $segments[1] == "") {
$manalias = JSFactory::getAliasManufacturer();
$manufacturer_id = array_search($segments[0], $manalias, true);
if ($manufacturer_id) {
$vars['controller'] = "manufacturer";
$vars['task'] = "view";
$vars['manufacturer_id'] = $manufacturer_id;
$dispatcher->trigger('onAfterParseRoute', array(&$vars, &$segments));
return $vars;
}
}
JError::raiseError(404, _JSHOP_PAGE_NOT_FOUND);
} else {
$vars['controller'] = $segments[0];
$vars['task'] = $segments[1];
if ($vars['controller'] == "category" && $vars['task'] == "view") {
$vars['category_id'] = $segments[2];
}
if ($vars['controller'] == "product" && $vars['task'] == "view") {
$vars['category_id'] = $segments[2];
$vars['product_id'] = $segments[3];
}
if ($vars['controller'] == "product" && $vars['task'] == "ajax_attrib_select_and_price") {
$vars['product_id'] = $segments[2];
}
if ($vars['controller'] == "manufacturer" && isset($segments[2])) {
$vars['manufacturer_id'] = $segments[2];
}
if ($vars['controller'] == "content") {
$vars['page'] = $segments[2];
}
}
$dispatcher->trigger('onAfterParseRoute', array(&$vars, &$segments));
return $vars;
}