本文整理汇总了PHP中Concrete\Core\Block\BlockController::duplicate方法的典型用法代码示例。如果您正苦于以下问题:PHP BlockController::duplicate方法的具体用法?PHP BlockController::duplicate怎么用?PHP BlockController::duplicate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Concrete\Core\Block\BlockController
的用法示例。
在下文中一共展示了BlockController::duplicate方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: duplicate
public function duplicate($newBID)
{
$db = Loader::db();
parent::duplicate($newBID);
$ar = AreaLayout::getByID($this->arLayoutID);
$nr = $ar->duplicate();
$db->Execute('update btCoreAreaLayout set arLayoutID = ? where bID = ?', array($nr->getAreaLayoutID(), $newBID));
}
示例2: duplicate
public function duplicate($newBID)
{
$ni = parent::duplicate($newBID);
$ag = Gathering::getByID($this->gaID);
$nr = $ag->duplicate();
$db = Database::connection();
$db->Execute('update btCoreGathering set gaID = ? where bID = ?', array($nr->getGatheringID(), $ni->bID));
}
示例3: duplicate_master
public function duplicate_master($newBID, $newPage)
{
parent::duplicate($newBID);
$db = Database::get();
$conv = Conversation::add();
$conv->setConversationPageObject($newPage);
$this->conversation = $conv;
$db->Execute('update btCoreConversation set cnvID = ? where bID = ?', array($conv->getConversationID(), $newBID));
}
示例4: duplicate
public function duplicate($newBlockID)
{
$db = Database::connection();
foreach ($this->getTextEntries() as $entry) {
$params = array($newBlockID, $entry);
$query = "INSERT INTO btTextListEntries (bID, textEntry) VALUES (?, ?)";
$db->query($query, $params);
}
return parent::duplicate($newBlockID);
}
示例5: duplicate
public function duplicate($newBID)
{
parent::duplicate($newBID);
$db = Database::getActiveConnection();
$v = array($this->bID);
$q = 'select * from btManualNavEntries where bID = ?';
$r = $db->query($q, $v);
while ($row = $r->FetchRow()) {
$db->execute('INSERT INTO btManualNavEntries (bID, linkURL, title, sortOrder) values(?,?,?,?)', array($newBID, $row['linkURL'], $row['title'], $row['sortOrder']));
}
}
示例6: duplicate
public function duplicate($newBID)
{
parent::duplicate($newBID);
$db = Loader::db();
$v = array($this->bID);
$q = 'select * from btVividSimpleAccordionItem where bID = ?';
$r = $db->query($q, $v);
while ($row = $r->FetchRow()) {
$db->execute('INSERT INTO btVividSimpleAccordionItem (bID, title, description, state, sortOrder) values(?,?,?,?,?)', array($newBID, $args['title'][$i], $args['description'][$i], $args['state'][$i], $args['sortOrder'][$i]));
}
}
示例7: duplicate
public function duplicate($newBID)
{
parent::duplicate($newBID);
$db = Loader::db();
$v = array($this->bID);
$q = 'select * from btImageSliderEntries where bID = ?';
$r = $db->query($q, $v);
while ($row = $r->FetchRow()) {
$db->execute('INSERT INTO btImageSliderEntries (bID, fID, linkURL, title, description, sortOrder) values(?,?,?,?,?,?)', array($newBID, $row['fID'], $row['linkURL'], $row['title'], $row['description'], $row['sortOrder']));
}
}
示例8: duplicate
public function duplicate($newBID)
{
parent::duplicate($newBID);
$db = Loader::db();
$v = array($this->bID);
$q = 'select * from btVividCarouselItem where bID = ?';
$r = $db->query($q, $v);
while ($row = $r->FetchRow()) {
if (empty($args['pageID'][$i])) {
$args['pageID'][$i] = 0;
}
if (empty($args['fID'][$i])) {
$args['fID'][$i] = 0;
}
$vals = array($newBID, $row['fID'][$i], $row['title'][$i], $row['carcontent'][$i], $row['pageID'][$i], $row['btntext'][$i], $row['sort'][$i]);
$db->execute('INSERT INTO btVividCarouselItem (bID, fID, title, carcontent, pageID, btntext, sort) values(?,?,?,?,?,?,?)', $vals);
}
}
示例9: duplicate
public function duplicate($newBID)
{
$db = Database::connection();
foreach ($this->options as $opt) {
$v1 = array($newBID, $opt->getOptionName(), $opt->getOptionDisplayOrder());
$q1 = "INSERT INTO btSurveyOptions (bID, optionName, displayOrder) VALUES (?, ?, ?)";
$db->query($q1, $v1);
$v2 = array($opt->getOptionID());
$newOptionID = $db->Insert_ID();
$q2 = "SELECT * FROM btSurveyResults WHERE optionID = ?";
$r2 = $db->query($q2, $v2);
if ($r2) {
while ($row = $r2->fetchRow()) {
$v3 = array($newOptionID, $row['uID'], $row['ipAddress'], $row['timestamp']);
$q3 = "INSERT INTO btSurveyResults (optionID, uID, ipAddress, timestamp) VALUES (?, ?, ?, ?)";
$db->query($q3, $v3);
}
}
}
return parent::duplicate($newBID);
}
示例10: duplicate
public function duplicate($newBID)
{
parent::duplicate($newBID);
$db = Loader::db();
$v = array($this->bID);
$q = 'select * from btFundamentalSlickSlide where bID = ?';
$r = $db->query($q, $v);
while ($row = $r->FetchRow()) {
$vals = array($newBID, $args['content'][$i], $args['fID'][$i], $args['sort'][$i]);
$db->execute('INSERT INTO btFundamentalSlickSlide (bID, content, fID, sort) values(?,?,?,?)', $vals);
}
}