本文整理匯總了PHP中Listing::searchAtIndex方法的典型用法代碼示例。如果您正苦於以下問題:PHP Listing::searchAtIndex方法的具體用法?PHP Listing::searchAtIndex怎麽用?PHP Listing::searchAtIndex使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Listing
的用法示例。
在下文中一共展示了Listing::searchAtIndex方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
<div class="title"><h3>Property Search</h3></div>
<div class="content">
<ul class="nav-list">
<li class="<?php
echo $activeForRent;
?>
first"><a href="<?php
echo $forRentUrl;
?>
">For Rent</a></li>
<li class="<?php
echo $activeForSale;
?>
last"><a href="<?php
echo $forSaleUrl;
?>
">For Sale</a></li>
</ul>
</div>
</div>
<?php
$this->widget('PropertySearch');
?>
<?php
$this->widget('AdsBannerMiddleWidget');
$this->endWidget();
?>
<?php
$this->widget('ListingWidget', array('dataProvider' => Listing::searchAtIndex()));
示例2: array
echo CHtml::dropDownList('sortBy', $selectSortBy, Listing::$SORT_BY, array('class' => 'sortBy'));
?>
</div>
<label class="lb">Items per page</label>
<div class="select-2">
<?php
echo CHtml::dropDownList('pageSize', $selectPageSize, Listing::$ITEM_PERPAGE, array('class' => 'pageSize'));
?>
</div>
<div class="pager"><ul></ul></div>
</div>
<?php
$dataProvider = Listing::searchAtIndex();
$widget = $this->widget('zii.widgets.CListView', array('dataProvider' => $dataProvider, 'id' => 'listing-grid', 'itemView' => 'list_item', 'viewData' => array('dataProvider' => $dataProvider), 'itemsCssClass' => 'items clearfix', 'ajaxUpdate' => false, 'enablePagination' => true, 'pager' => array('maxButtonCount' => 5, 'header' => false, 'footer' => false, 'prevPageLabel' => 'Previous', 'nextPageLabel' => 'Next', 'lastPageLabel' => '', 'firstPageLabel' => '', 'selectedPageCssClass' => 'active'), 'template' => '{items}{pager}'));
?>
<div class="action-group clearfix">
<label class="lb">Sort By</label>
<div class="select-1">
<?php
echo CHtml::dropDownList('sortBy', $selectSortBy, Listing::$SORT_BY, array('class' => 'sortBy'));
?>
</div>
<label class="lb">Items per page</label>
<div class="select-2">
<?php
echo CHtml::dropDownList('pageSize', $selectPageSize, Listing::$ITEM_PERPAGE, array('class' => 'pageSize'));