本文整理匯總了PHP中Style::selectGenre方法的典型用法代碼示例。如果您正苦於以下問題:PHP Style::selectGenre方法的具體用法?PHP Style::selectGenre怎麽用?PHP Style::selectGenre使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Style
的用法示例。
在下文中一共展示了Style::selectGenre方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: run
public function run()
{
//Filter::initialization();
//error_log(print_r(Yii::app()->basePath,true));
$data = array();
$event = Events::$even;
if (Filter::getSortByDate()) {
usort($event, "Events::sortByDate");
} elseif (Filter::getSortByPopularity()) {
usort($event, "Events::sortByPopularity");
}
//error_log(print_r($this->controller->getViewFile('poster'),true));
$data['ajaxContent'] = $this->controller->renderPartial('poster', array('parameters' => $event), true);
$data['main_menu'] = $this->controller->renderPartial('main_menu', array(), true);
$location = new Location();
$style = new Style();
$data['country'] = $location->selectContry();
if (!Filter::getCountryId()) {
Filter::setCountryId(current(array_keys($data['country'])));
}
$data['city'] = $location->selectCity(Filter::getCountryId());
if (!Filter::getCityId()) {
Filter::setCityId(0);
}
//Filter::setCityId(current(array_keys($data['city'])));
$data['style'] = $style->selectStyle();
if (!Filter::getStyleId()) {
Filter::setStyleId(current(array_keys($data['style'])));
}
/*Filter::getStyleId()*/
$data['genre'] = $style->selectGenre(Filter::getStyleId());
if (!Filter::getGenreId()) {
Filter::setGenreId(current(array_keys($data['genre'])));
}
$data['model'] = new FilterForm();
$this->controller->render('index', $data);
//$this->controller->render('translationUser', array('row'=>0));
}