本文整理匯總了PHP中Docs::search方法的典型用法代碼示例。如果您正苦於以下問題:PHP Docs::search方法的具體用法?PHP Docs::search怎麽用?PHP Docs::search使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Docs
的用法示例。
在下文中一共展示了Docs::search方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Docs
<?php
/* * *********************************************************************************
* The contents of this file are subject to the Mozilla Public License Version 2.0
* ("License"); You may not use this file except in compliance with the Mozilla Public License Version 2.0
* The Original Code is: Linet 3.0 Open Source
* The Initial Developer of the Original Code is Adam Ben Hur.
* All portions are Copyright (C) Adam Ben Hur.
* All Rights Reserved.
* ********************************************************************************** */
$model = new Docs('search');
$model->unsetAttributes();
if (isset($_GET['Docs'])) {
$model->attributes = $_GET['Docs'];
}
//$var=CHtml::link(CHtml::encode($data->docnum),"#", array("onclick"=>'refNum('.CJSON::encode($data).')'));
$this->widget('EExcelView', array('id' => 'docs-grid', 'dataProvider' => $model->search(), 'template' => '{items}{pager}', 'filter' => $model, 'columns' => array(array('name' => 'doctype', 'filter' => CHtml::listData(Doctype::model()->findAll(), 'id', 'name'), 'value' => '$data->getTypeName()', 'htmlOptions' => array('style' => 'width:35%;')), array('name' => 'docnum', 'value' => 'CHtml::link(CHtml::encode($data->docnum),"#", array("onclick"=>\'refNum(\'.CJSON::encode($data).\')\'));', 'type' => 'raw', 'htmlOptions' => array('style' => 'width:5%;')), 'company', array('name' => 'status', 'value' => '$data->getStatus()', 'htmlOptions' => array('style' => 'width:8%;')), array('name' => 'total', 'htmlOptions' => array('style' => 'width:8%;')))));
?>