コード例 #1
0
if (isset($Params['BrowseSelected']) && $Params['BrowseSelected'] == 'article') {
    if ($http->hasPostVariable('SelectedObjectIDArray')) {
        $articlePoolNodeID = $http->postVariable('SelectedObjectIDArray');
        if (isset($articlePoolNodeID) && !$http->hasPostVariable('BrowseCancelButton')) {
            $newsletterType->setAttribute('article_pool_object_id', $articlePoolNodeID[0]);
            $newsletterType->store();
        }
    }
} else {
    if (isset($Params['BrowseSelected']) && $Params['BrowseSelected'] == 'inbox') {
        if ($http->hasPostVariable('SelectedObjectIDArray')) {
            $inboxNodeID = $http->postVariable('SelectedObjectIDArray');
            if (isset($inboxNodeID) && !$http->hasPostVariable('BrowseCancelButton')) {
                $newsletterType->setAttribute('inbox_id', $inboxNodeID[0]);
                $newsletterType->store();
            }
        }
    }
}
$tpl = eZNewsletterTemplateWrapper::templateInit();
$tpl->setVariable('warning', $warning);
$tpl->setVariable('newsletter_type', $newsletterType);
$tpl->setVariable('contentclass_list', eZNewsletterType::unserializeArray($newsletterType->attribute('contentclass_list')));
$tpl->setVariable('selected_designs', eZNewsletterType::unserializeArray($newsletterType->attribute('allowed_designs')));
// countAll(eZSendNewsletterItem::definition()) ) ) erzeugt einen sql fehler
$tpl->setVariable('subscription_list_array', eZSubscriptionList::fetchList(0, eZSubscriptionList::countAll(eZSubscriptionList::StatusPublished)));
$Result = array();
$Result['newsletter_menu'] = 'design:parts/content/newsletter_menu.tpl';
$Result['left_menu'] = 'design:parts/content/eznewsletter_menu.tpl';
$Result['content'] = $tpl->fetch("design:{$extension}/edit_newslettertype.tpl");
$Result['path'] = array(array('url' => false, 'text' => ezpI18n::tr('eznewsletter/edit_newslettertype', 'Edit newsletter type')));
コード例 #2
0
 function fetchSubscriptionListCount($useFilter)
 {
     return array('result' => eZSubscriptionList::countAll(eZSubscriptionList::StatusPublished, $useFilter));
 }