本文整理匯總了PHP中Button::findList方法的典型用法代碼示例。如果您正苦於以下問題:PHP Button::findList方法的具體用法?PHP Button::findList怎麽用?PHP Button::findList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Button
的用法示例。
在下文中一共展示了Button::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()
{
$Button = new Button();
$this->getView()->set('Buttons', $Button->findList(array(), 'Position asc'));
return $this->getView()->render();
}