本文整理汇总了PHP中Banner::findList方法的典型用法代码示例。如果您正苦于以下问题:PHP Banner::findList方法的具体用法?PHP Banner::findList怎么用?PHP Banner::findList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Banner
的用法示例。
在下文中一共展示了Banner::findList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
/**
* The index handler.
*
* @access public
* @return string The HTML code.
*/
public function index()
{
$Article = new Article();
$Client = new Client();
$Button = new Button();
$Proud = new Proud();
$Banner = new Banner();
$a = array();
$a[] = 'PostedAt < ' . time();
$a[] = 'Type = ' . Article::ARTICLE;
$b = array();
$b[] = 'PostedAt < ' . time();
$b[] = 'Type = ' . Article::NEWS;
foreach ($Banner->findList(array(), 'rand()', 0, 1) as $Banner) {
}
$this->getView()->set(array('Articles' => $Article->findShortList($a, 'PostedAt desc', 0, 4), 'News' => $Article->findShortList($b, 'PostedAt desc', 0, 2), 'Clients' => $Client->findList(array(), 'Position asc', 0, 8), 'Buttons' => $Button->findList(array(), 'Position asc', 0, 3), 'Prouds' => $Proud->getLastProuds(), 'Banner' => $Banner));
return $this->getView()->render();
}
示例2: index
/**
* The index handler.
*
* @access public
* @return string The HTML code.
*/
public function index()
{
$Banner = new Banner();
$this->getView()->set('Banners', $Banner->findList(array(), 'Position asc'));
return $this->getView()->render();
}