本文整理汇总了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);
//.........这里部分代码省略.........