本文整理汇总了PHP中Contest::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Contest::all方法的具体用法?PHP Contest::all怎么用?PHP Contest::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contest
的用法示例。
在下文中一共展示了Contest::all方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: contest
/**
* @before _secure
*/
public function contest($id = null)
{
$this->seo(['title' => 'Contest', 'description' => 'campaign contest']);
$view = $this->getActionView();
if (RM::type() === 'POST') {
$msg = \Contest::updateContests($this);
$view->set($msg);
}
if (RM::type() === 'DELETE') {
$contest = \Contest::deleteAll(['_id' => $id]);
$view->set('message', 'Contest removed!!');
}
$contests = \Contest::all(["org_id = ?" => $this->org->_id]);
$view->set('contests', $contests);
}
示例2: contests
/**
* @before _secure
*/
public function contests()
{
$this->seo(array("title" => "Publisher Register", "description" => "Register"));
$view = $this->getActionView();
$contests = \Contest::all(['org_id' => $this->org->_id]);
$view->set('contests', $contests);
}