本文整理汇总了PHP中F0FController::browse方法的典型用法代码示例。如果您正苦于以下问题:PHP F0FController::browse方法的具体用法?PHP F0FController::browse怎么用?PHP F0FController::browse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类F0FController
的用法示例。
在下文中一共展示了F0FController::browse方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: browse
public function browse($cachable = false)
{
// When groupbydate is set to 1 we force a JSON view which returns the
// sales info (subscriptions, net amount) grouped by date. You can use
// the since/until or other filter in the URL to filter the whole lot
$groupbydate = $this->input->getInt('groupbydate', 0);
$groupbylevel = $this->input->getInt('groupbylevel', 0);
if ($groupbydate == 1 || $groupbylevel == 1) {
if (JFactory::getUser()->guest) {
return false;
} else {
$list = $this->getThisModel()->savestate(0)->limit(0)->limitstart(0)->getItemList();
header('Content-type: application/json');
echo json_encode($list);
JFactory::getApplication()->close();
}
}
// Limit what a front-end user can do
if (JFactory::getApplication()->isSite()) {
if (JFactory::getUser()->guest) {
return false;
} else {
$this->input->set('user_id', JFactory::getUser()->id);
}
}
// If it's the back-end CSV view, force no limits
if (JFactory::getApplication()->isAdmin() && $this->input->getCmd('format', 'html') == 'csv') {
$this->getThisModel()->savestate(0)->limit(0)->limitstart(0);
}
return parent::browse($cachable);
}
示例2: browse
public function browse()
{
if (parent::browse()) {
$config = J2Store::config();
$complete = $config->get('installation_complete', 0);
if ($complete) {
JFactory::getApplication()->redirect('index.php?option=com_j2store&view=cpanel', JText::_('J2STORE_POSTCONFIG_STORE_SETUP_DONE_ALREADY'));
}
return true;
}
return false;
}
示例3: browse
public function browse()
{
$app = JFactory::getApplication();
$model = $this->getThisModel();
$state = $this->getFilterStates();
foreach ($state as $key => $value) {
$model->setState($key, $value);
}
//$product_types = $model->getProductTypes();
//array_unshift($product_types, JText::_('J2STORE_SELECT_OPTION'));
$products = $model->getStockProductList();
$product_helper = J2Store::product();
foreach ($products as $product) {
$product->product = $product_helper->setId($product->j2store_product_id)->getProduct();
}
$view = $this->getThisView();
$view->setModel($model);
$view->assign('products', $products);
$view->assign('state', $model->getState());
//$view->assign('product_types',$product_types);
return parent::browse();
}
示例4: import
public function import()
{
$this->layout = 'import';
parent::browse();
}