本文整理汇总了PHP中SiteHelpers::mainCategory方法的典型用法代码示例。如果您正苦于以下问题:PHP SiteHelpers::mainCategory方法的具体用法?PHP SiteHelpers::mainCategory怎么用?PHP SiteHelpers::mainCategory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SiteHelpers
的用法示例。
在下文中一共展示了SiteHelpers::mainCategory方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
@extends('frontend.index')
@section('content')
<?php
$categories = SiteHelpers::mainCategory('category');
$currentRoute = Route::current();
$parameters = $currentRoute->parameters();
if ($parameters) {
$cat = SiteHelpers::CF_decode_json($parameters['one']);
if (is_array($cat)) {
$pollNext[0] = $cat[0];
$pollNext[1] = $cat[1];
} else {
$pollNext[0] = $cat;
$pollNext[1] = '';
}
} else {
$pollNext[0] = '';
$pollNext[1] = '';
}
// echo "<pre>";print_r($polls);die;
if (isset($polls)) {
$pollNext[2] = $polls->pk_poll_id;
} else {
$pollNext[2] = '';
}
$nextPollArr = SiteHelpers::CF_encode_json($pollNext);
?>
<div class="main-banner m-none">
<img src="{{ URL::asset('images/banner-main.jpg') }}" alt="">
<!--main-banner --></div>
示例2:
$linkSelect = SiteHelpers::CF_encode_json($parameters);
if ($parameters) {
$cat = SiteHelpers::CF_decode_json($parameters['one']);
if (is_array($cat)) {
$categoryId = $cat[1];
} else {
$categoryId = $cat;
}
} else {
$categoryId = 'all';
}
/*if($params)
{
}*/
$subCategories = SiteHelpers::mainCategory($categoryId);
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0" />
<title>:: The Indian Edition ::</title>
<link type="text/css" rel="stylesheet" href="{{ URL::asset('css/layout.css') }}">
<link type="text/css" rel="stylesheet" href="{{ URL::asset('css/iPad.css') }}">
<link type="text/css" rel="stylesheet" href="{{ URL::asset('css/mobile-small.css') }}">
<link type="text/css" rel="stylesheet" href="{{ URL::asset('css/mobile-480.css') }}">
<link rel="stylesheet" type="text/css" href="{{ URL::asset('css/magnific-popup.css') }}"/>
<link type="text/css" rel="stylesheet" href="{{ URL::asset('css/font-awesome.min.css') }}">
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="{{ URL::asset('scripts/jquery-1.10.2.min.js') }}"></script>