本文整理汇总了PHP中Campaign::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Campaign::all方法的具体用法?PHP Campaign::all怎么用?PHP Campaign::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Campaign
的用法示例。
在下文中一共展示了Campaign::all方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showIndex
public function showIndex()
{
$campaigns = Campaign::all();
$this->layout->content = View::make('public.home.index');
$this->layout->content->campaigns = $campaigns;
$this->layout->content_title = Lang::get('campaigns.list');
}
示例2: index
public function index()
{
$this->getLayoutView()->set("seo", Framework\Registry::get("seo"));
$view = $this->getActionView();
$limit = RequestMethods::get("limit", 10);
$page = RequestMethods::get("page", 1);
$items = Campaign::all(array("live = ?" => true), array("id", "live", "image", "title", "description"), "created", "desc", $limit, $page);
$count = Campaign::count(array("live = ?" => true));
$view->set("items", $items)->set("count", $count)->set("limit", $limit)->set("page", $page);
}
示例3: all
/**
* @before _secure, changeLayout, _admin
*/
public function all()
{
$this->seo(array("title" => "All Games", "view" => $this->getLayoutView()));
$view = $this->getActionView();
$limit = RequestMethods::get("limit", 10);
$page = RequestMethods::get("page", 1);
$campaign = Campaign::all(array(), array("*"), "created", "desc", $limit, $page);
$count = Campaign::count();
$view->set("campaigns", $campaign);
$view->set("count", $count);
$view->set("limit", $limit);
$view->set("page", $page);
}
示例4: foreach
<?php
// On met en place la protection
User::protection(5);
// On récupère la liste des campagnes
$liste = Campaign::all('email');
// On charge le template
Core::loadHeader();
?>
<h2 class="titreCampagne" data-page="campagnes">Campagnes de Email groupés</h2>
<?php
if (count($liste)) {
?>
<section id="campagnes">
<ul class="liste-campagnes">
<?php
foreach ($liste as $element) {
?>
<li>
<a href="<?php
Core::goPage('campagne', array('id' => $element['id']));
?>
" class="nostyle"><h4><?php
if (!empty($element['objet'])) {
echo $element['objet'];
} else {
echo 'Campagne sans titre';
}
?>
</h4></a>
<p>Campagne <?php
示例5: foreach
<?php
// On met en place la protection
User::protection(5);
// On récupère la liste des campagnes
$liste = Campaign::all('sms');
// On charge le template
Core::loadHeader();
?>
<h2 class="titreCampagne" data-page="campagnes">Campagnes de SMS groupés</h2>
<?php
if (count($liste)) {
?>
<section id="campagnes">
<ul class="liste-campagnes">
<?php
foreach ($liste as $element) {
?>
<li>
<a href="<?php
Core::goPage('campagne', array('id' => $element['id']));
?>
" class="nostyle"><h4><?php
if (!empty($element['titre'])) {
echo $element['titre'];
} else {
echo 'Campagne sans titre';
}
?>
</h4></a>
<p>Campagne <?php
示例6: foreach
<?php
// On met en place la protection
User::protection(5);
// On récupère la liste des campagnes
$liste = Campaign::all('publi');
// On charge le template
Core::loadHeader();
?>
<h2 class="titreCampagne" data-page="campagnes">Préparation des campagnes de publipostage</h2>
<?php
if (count($liste)) {
?>
<section id="campagnes">
<ul class="liste-campagnes">
<?php
foreach ($liste as $element) {
$campaign = new Campaign($element['id']);
?>
<li>
<a href="<?php
Core::goPage('publi', array('campagne' => $element['id']));
?>
" class="nostyle"><h4><?php
if (!empty($element['titre'])) {
echo $element['titre'];
} else {
echo 'Campagne sans titre';
}
?>
</h4></a>