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