本文整理匯總了PHP中eZContentObjectStateGroup::allowInternalCUD方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZContentObjectStateGroup::allowInternalCUD方法的具體用法?PHP eZContentObjectStateGroup::allowInternalCUD怎麽用?PHP eZContentObjectStateGroup::allowInternalCUD使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eZContentObjectStateGroup
的用法示例。
在下文中一共展示了eZContentObjectStateGroup::allowInternalCUD方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
$cli = eZCLI::instance();
$scriptSettings = array();
$scriptSettings['description'] = 'Add the ez_lock system state group';
$scriptSettings['use-session'] = true;
$scriptSettings['use-modules'] = true;
$scriptSettings['use-extensions'] = true;
$script = eZScript::instance($scriptSettings);
$script->startup();
$config = '';
$argumentConfig = '';
$optionHelp = false;
$arguments = false;
$useStandardOptions = true;
$options = $script->getOptions($config, $argumentConfig, $optionHelp, $arguments, $useStandardOptions);
$script->initialize();
eZContentObjectStateGroup::$allowInternalCUD = true;
$lockGroup = eZContentObjectStateGroup::fetchByIdentifier('ez_lock');
if ($lockGroup) {
$script->shutdown(1, 'ez_lock state group already exists');
}
$db = eZDB::instance();
$db->begin();
$locales = eZContentLanguage::fetchLocaleList();
$localeToUse = false;
$localeIDToUse = false;
// this script inserts English names, so preferably use an English locale
$preferredLocales = array('eng-GB', 'eng-US');
foreach ($preferredLocales as $preferredLocale) {
if (in_array($preferredLocale, $locales)) {
$localeToUse = $preferredLocale;
break;