本文整理汇总了PHP中GetUtil::resolveSelectedIdsFromGet方法的典型用法代码示例。如果您正苦于以下问题:PHP GetUtil::resolveSelectedIdsFromGet方法的具体用法?PHP GetUtil::resolveSelectedIdsFromGet怎么用?PHP GetUtil::resolveSelectedIdsFromGet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GetUtil
的用法示例。
在下文中一共展示了GetUtil::resolveSelectedIdsFromGet方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getListView
/**
* @param string $moduleName
* @param bool $forceEmptyResults
* Return an empty listView
* @return View
*/
public function getListView($moduleName, $forceEmptyResults = false)
{
assert('is_string($moduleName)');
$pageSize = $this->pageSize;
$module = Yii::app()->findModule($moduleName);
$searchFormClassName = $module::getGlobalSearchFormClassName();
$modelClassName = $module::getPrimaryModelName();
$model = new $modelClassName(false);
$searchForm = new $searchFormClassName($model);
$sanitizedSearchAttributes = MixedTermSearchUtil::getGlobalSearchAttributeByModuleAndPartialTerm($module, $this->term);
$metadataAdapter = new SearchDataProviderMetadataAdapter($searchForm, $this->user->id, $sanitizedSearchAttributes);
$listViewClassName = $module::getPluralCamelCasedName() . 'ForMixedModelsSearchListView';
$sortAttribute = SearchUtil::resolveSortAttributeFromGetArray($modelClassName);
$sortDescending = SearchUtil::resolveSortDescendingFromGetArray($modelClassName);
if ($forceEmptyResults) {
$dataProviderClass = 'EmptyRedBeanModelDataProvider';
$emptyText = '';
} else {
$dataProviderClass = 'RedBeanModelDataProvider';
$emptyText = null;
}
$dataProvider = RedBeanModelDataProviderUtil::makeDataProvider($metadataAdapter->getAdaptedMetadata(false), $modelClassName, $dataProviderClass, $sortAttribute, $sortDescending, $pageSize, $module->getStateMetadataAdapterClassName());
$listView = new $listViewClassName('default', $module->getId(), $modelClassName, $dataProvider, GetUtil::resolveSelectedIdsFromGet(), '-' . $moduleName, array('route' => '', 'class' => 'SimpleListLinkPager', 'firstPageLabel' => '<span>first</span>', 'prevPageLabel' => '<span>previous</span>', 'nextPageLabel' => '<span>next</span>', 'lastPageLabel' => '<span>last</span>'));
$listView->setRowsAreSelectable(false);
$listView->setEmptyText($emptyText);
return $listView;
}
示例2: getProjectsLatestActivityFeedView
/**
* Get latest activity feed list view
* @return ListView
*/
public static function getProjectsLatestActivityFeedView($controller, $pageSize)
{
$project = new Project(false);
$searchForm = new ProjectsSearchForm($project);
$dataProvider = RedBeanModelDataProviderUtil::makeDataProvider(array(), 'ProjectAuditEvent', 'RedBeanModelDataProvider', 'dateTime', true, $pageSize);
$listView = new ProjectsFeedListView($controller->id, $controller->getModule()->getId(), get_class($searchForm->getModel()), $dataProvider, GetUtil::resolveSelectedIdsFromGet(), null, array(), $searchForm->getListAttributesSelector(), $searchForm->getKanbanBoard());
return $listView;
}
示例3: makeSearchAndListView
/**
* Make search and list view.
* @param SearchForm $searchModel
* @param string $moduleName
* @param RedBeanModelDataProvider $dataProvider
* @return \SearchAndListView
*/
protected function makeSearchAndListView($searchModel, $moduleName, $dataProvider)
{
$listModel = $searchModel->getModel();
return new SearchAndListView($this->getId(), $this->getModule()->getId(), $searchModel, $listModel, $moduleName, $dataProvider, GetUtil::resolveSelectedIdsFromGet());
}
示例4: makeListView
protected function makeListView(SearchForm $searchForm, $dataProvider, $listViewClassName = null)
{
assert('is_string($listViewClassName) || $listViewClassName == null');
$listModel = $searchForm->getModel();
if ($listViewClassName == null) {
$listViewClassName = $this->getModule()->getPluralCamelCasedName() . 'ListView';
}
$listView = new $listViewClassName($this->getId(), $this->getModule()->getId(), get_class($listModel), $dataProvider, GetUtil::resolveSelectedIdsFromGet(), null, array(), $searchForm->getListAttributesSelector(), $searchForm->getKanbanBoard());
return $listView;
}