本文整理匯總了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>