本文整理匯總了PHP中eZContentClassClassGroup::update方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZContentClassClassGroup::update方法的具體用法?PHP eZContentClassClassGroup::update怎麽用?PHP eZContentClassClassGroup::update使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eZContentClassClassGroup
的用法示例。
在下文中一共展示了eZContentClassClassGroup::update方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: renamegroup
private function renamegroup($groupIdentifier, $newGroupIdentifier)
{
$groupObject = eZContentClassGroup::fetchByName($groupIdentifier, true);
if ($groupObject == null) {
echo "Invalid group identifier\n";
return;
}
$date_time = time();
$groupObject->setAttribute("modified", $date_time);
$groupObject->setAttribute("modifier_id", false);
$groupObject->setAttribute("name", $newGroupIdentifier);
$groupObject->store();
eZContentClassClassGroup::update(null, $groupObject->ID, $newGroupIdentifier);
echo "Successfully renamed group {$groupIdentifier} to {$newGroupIdentifier}\n";
}
示例2: time
if ($http->hasPostVariable("DiscardButton")) {
$Module->redirectTo($Module->functionURI("grouplist"));
return;
}
if ($http->hasPostVariable("StoreButton")) {
if ($http->hasPostVariable("Group_name")) {
$name = $http->postVariable("Group_name");
}
$classgroup->setAttribute("name", $name);
// Set new modification date
$date_time = time();
$classgroup->setAttribute("modified", $date_time);
$user = eZUser::currentUser();
$user_id = $user->attribute("contentobject_id");
$classgroup->setAttribute("modifier_id", $user_id);
$classgroup->store();
eZContentClassClassGroup::update(null, $GroupID, $name);
$Module->redirectToView('classlist', array($classgroup->attribute('id')));
return;
}
$Module->setTitle("Edit class group " . $classgroup->attribute("name"));
// Template handling
$tpl = eZTemplate::factory();
$res = eZTemplateDesignResource::instance();
$res->setKeys(array(array("classgroup", $classgroup->attribute("id"))));
$tpl->setVariable("http", $http);
$tpl->setVariable("module", $Module);
$tpl->setVariable("classgroup", $classgroup);
$Result = array();
$Result['content'] = $tpl->fetch("design:class/groupedit.tpl");
$Result['path'] = array(array('url' => '/class/grouplist/', 'text' => ezpI18n::tr('kernel/class', 'Class groups')), array('url' => false, 'text' => $classgroup->attribute('name')));