本文整理匯總了PHP中ca_sets::duplicateItemsInSet方法的典型用法代碼示例。如果您正苦於以下問題:PHP ca_sets::duplicateItemsInSet方法的具體用法?PHP ca_sets::duplicateItemsInSet怎麽用?PHP ca_sets::duplicateItemsInSet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ca_sets
的用法示例。
在下文中一共展示了ca_sets::duplicateItemsInSet方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: DuplicateItems
public function DuplicateItems()
{
$t_set = new ca_sets($this->getRequest()->getParameter('set_id', pInteger));
if (!$t_set->getPrimaryKey()) {
return;
}
if ($this->getRequest()->getParameter('setForDupes', pString) == 'current') {
$pa_dupe_options = array('addToCurrentSet' => true);
} else {
$pa_dupe_options = array('addToCurrentSet' => false);
}
unset($_REQUEST['form_timestamp']);
$t_dupe_set = $t_set->duplicateItemsInSet($this->getRequest()->getUserID(), $pa_dupe_options);
if (!$t_dupe_set) {
$this->notification->addNotification(_t('Could not duplicate items in set: %1', join(';', $t_set->getErrors())), __NOTIFICATION_TYPE_ERROR__);
$this->Edit();
return;
}
$this->notification->addNotification(_t('Records have been successfully duplicated and added to set'), __NOTIFICATION_TYPE_INFO__);
$this->opo_response->setRedirect(caEditorUrl($this->getRequest(), 'ca_sets', $t_dupe_set->getPrimaryKey()));
return;
}