本文整理匯總了PHP中Website::setLabel方法的典型用法代碼示例。如果您正苦於以下問題:PHP Website::setLabel方法的具體用法?PHP Website::setLabel怎麽用?PHP Website::setLabel使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Website
的用法示例。
在下文中一共展示了Website::setLabel方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: InitData
function InitData($project_name)
{
$listPageType = 'list_types';
$c = new Criteria();
$c->add(ListsPeer::LIST_ID, $listPageType);
$listExist = ListsPeer::doSelectOne($c);
if (!$listExist) {
echo "Creating list 'list_type'...\n";
$newList = new Lists();
$newList->setLabel('List Types');
$newList->setListid($listPageType);
$newList->setListtype('system');
$newList->save();
$newItem = new Listitem();
$newItem->setLabel('System list');
$newItem->setValue('system');
$newItem->save(null, $newList);
$newItem = new Listitem();
$newItem->setLabel('Static list');
$newItem->setValue('static');
$newItem->save(null, $newList);
$newItem = new Listitem();
$newItem->setLabel('Editable list');
$newItem->setValue('editable');
$newItem->save(null, $newList);
}
$listPageType = 'page_types';
$c = new Criteria();
$c->add(ListsPeer::LIST_ID, $listPageType);
$listExist = ListsPeer::doSelectOne($c);
if (!$listExist) {
echo "Creating list 'page_types'...\n";
$newList = new Lists();
$newList->setLabel('Page Types');
$newList->setListid($listPageType);
$newList->setListtype('system');
$newList->save();
$newItem = new Listitem();
$newItem->setLabel('Content page');
$newItem->setValue('CONTENT');
$newItem->save(null, $newList);
$newItem = new Listitem();
$newItem->setLabel('Page reference');
$newItem->setValue('REFERENCE');
$newItem->save(null, $newList);
$newItem = new Listitem();
$newItem->setLabel('External page');
$newItem->setValue('EXTERNAL');
$newItem->save(null, $newList);
}
$cultureType = 'culture';
$c = new Criteria();
$c->add(ListsPeer::LIST_ID, $cultureType);
$listExist = ListsPeer::doSelectOne($c);
if (!$listExist) {
echo "Creating list 'culture'...\n";
$newList = new Lists();
$newList->setLabel('Culture');
$newList->setListid($cultureType);
$newList->setListtype('system');
$newList->save();
$newItem = new Listitem();
$newItem->setLabel('english');
$newItem->setValue('en');
$newItem->save(null, $newList);
/* $newItem = new Listitem();
$newItem->setLabel('български');
$newItem->setValue('bg');
$newItem->save(null, $newList);*/
}
$userType = 'usertype';
$c = new Criteria();
$c->add(ListsPeer::LIST_ID, $userType);
$listExist = ListsPeer::doSelectOne($c);
if (!$listExist) {
echo "Creating list 'user types'...\n";
$newList = new Lists();
$newList->setLabel('User Types');
$newList->setListid($userType);
$newList->setListtype('system');
$newList->save();
$newItem = new Listitem();
$newItem->setLabel('Administrator (all rights)');
$newItem->setValue('admin');
$newItem->save(null, $newList);
$newItem = new Listitem();
$newItem->setLabel('Editor (no access to administration modules)');
$newItem->setValue('editor');
$newItem->save(null, $newList);
$newItem = new Listitem();
$newItem->setLabel('Editor (edit and save existing items)');
$newItem->setValue('restricted_editor');
$newItem->save(null, $newList);
}
$Mailinglist_Folder = Document::getDocumentByExclusiveTag('newsletter_folder_mailinglist');
if (!$Mailinglist_Folder) {
$Newsletter_Root = Rootfolder::getRootfolderByModule('Newsletter');
$Mailinglist_Folder = new Folder();
$Mailinglist_Folder->setLabel('Mailing lists');
$Mailinglist_Folder->save(null, $Newsletter_Root);
//.........這裏部分代碼省略.........