本文整理汇总了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')));