本文整理汇总了PHP中XenForo_DataWriter::_postSave方法的典型用法代码示例。如果您正苦于以下问题:PHP XenForo_DataWriter::_postSave方法的具体用法?PHP XenForo_DataWriter::_postSave怎么用?PHP XenForo_DataWriter::_postSave使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XenForo_DataWriter
的用法示例。
在下文中一共展示了XenForo_DataWriter::_postSave方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _postSave
protected function _postSave()
{
parent::_postSave();
if ($this->getOption(self::OPTION_UPDATE_CATEGORY)) {
$this->rebuildCategoryCounter();
}
}
示例2: _postSave
protected function _postSave()
{
/* @var $userScopeModel bdApi_Model_UserScope */
$userScopeModel = $this->getModelFromCache('bdApi_Model_UserScope');
$userScopeModel->updateUserScopes($this->getMergedData());
parent::_postSave();
}
示例3: _postSave
protected function _postSave()
{
if ($this->isInsert() or $this->isChanged('tag_text')) {
$this->_rebuildCache();
}
return parent::_postSave();
}
示例4: _postSave
protected function _postSave()
{
if ($this->getOption(self::OPTION_UPDATE_CALLBACKS)) {
$this->_getSubscriptionModel()->updateCallbacksForTopic($this->get('topic'));
}
parent::_postSave();
}
示例5: _postSave
protected function _postSave()
{
$this->getModelFromCache('XenForo_Model_Permission')->rebuildPermissionCache();
// insert a dummy page
$pageDw = XenForo_DataWriter::create('LiquidPro_SimpleForms_DataWriter_Page');
$pageDw->bulkSet(array('form_id' => $this->get('form_id'), 'page_number' => 1, 'title' => '', 'description' => ''));
$pageDw->save();
parent::_postSave();
}
示例6: _postSave
protected function _postSave()
{
if ($this->isInsert()) {
// insert a dummy page
$pageDw = XenForo_DataWriter::create('LiquidPro_SimpleForms_DataWriter_Page');
$pageDw->bulkSet(array('form_id' => $this->get('form_id'), 'page_number' => 1, 'title' => '', 'description' => ''));
$pageDw->save();
}
parent::_postSave();
}
示例7: _postSave
protected function _postSave()
{
$this->updateFields();
if ($this->_executeDestinations) {
$destinationModel = $this->_getDestinationModel();
$destinationOptionModel = $this->_getDestinationOptionModel();
// attachment handling
$attachmentHash = $this->getExtraData(self::DATA_ATTACHMENT_HASH);
if ($attachmentHash) {
$attachmentModel = $this->_getAttachmentModel();
$attachments = $attachmentModel->getAttachmentsByTempHash($attachmentHash);
}
// redirect handling
$form = $this->_getFormModel()->getFormById($this->get('form_id'));
$redirectDestination = null;
if ($form['redirect_method'] == 'destination') {
$redirectDestination = $form['redirect_destination'];
}
// get the destinations for a form and loop through them to handle them if necessary
$destinations = $destinationModel->getDestinationsByFormId($form['form_id']);
foreach ($destinations as $destination) {
// only handle active destinations
if ($destination['active']) {
// get the destination options
$destinationOptions = $destinationOptionModel->prepareDestinationOptions($destinationOptionModel->getDestinationOptionsByFormDestinationId($destination['form_destination_id']), true);
// create the destination
$formDestination = new $destination['handler_class']($form['form_id'], $this->_updateFields, $destinationOptions, null, $this->get('response_id'));
// handle attachments
if ($destinationOptionModel->getAttachmentsEnabled($form['form_id']) && $attachments) {
// create new temporary hash
$newAttachmentHash = md5(uniqid('', true));
// duplicate the attachment so others can use it
foreach ($attachments as $attachmentId => $attachment) {
$duplicateAttachmentId = $attachmentModel->insertTemporaryAttachment($attachment['data_id'], $newAttachmentHash);
}
$formDestination->setAttachmentHash($attachmentId, $duplicateAttachmentId, $newAttachmentHash);
}
// save the destination
$formDestination->save();
// get the redirect url from the destination
if (isset($redirectDestination) && $destination['form_destination_id'] == $redirectDestination) {
$redirectMethod = $destination['redirect_method'];
$this->_redirectUrl = $formDestination->{$redirectMethod}();
}
}
}
// delete the temporary attachment hash
if ($attachmentHash) {
foreach ($attachments as $attachmentId => $attachment) {
$dw = XenForo_DataWriter::create('XenForo_DataWriter_Attachment');
$dw->setExistingData($attachment);
$dw->delete();
}
}
}
parent::_postSave();
}
示例8: _postSave
protected function _postSave()
{
$this->updateDestinationOptions();
$this->getModelFromCache('XenForo_Model_Permission')->rebuildPermissionCache();
parent::_postSave();
}
示例9: _postSave
protected function _postSave()
{
$this->_insertOrUpdateMasterPhrase($this->_getWidgetModel()->getWidgetTitlePhrase($this->get('widget_id')), $this->get('title'), '', array('global_cache' => 1));
if ($this->_isTemplateWidget($this->get('class'))) {
$this->_getWidgetRendererTemplateModel()->dwPostSave($this->getMergedData(), $this->getWidgetOptions());
} elseif ($this->isChanged('class') && $this->_isTemplateWidget($this->getExisting('class'))) {
$this->_getWidgetRendererTemplateModel()->dwPostDelete($this->getMergedExistingData(), $this->getWidgetOptions(true));
}
parent::_postSave();
}
示例10: _postSave
protected function _postSave()
{
$this->updateDestinationOptions();
parent::_postSave();
}
示例11: _postSave
protected function _postSave()
{
parent::_postSave();
$this->_insertIntoSearchIndex();
}
示例12: _postSave
protected function _postSave()
{
$this->_updateTag($this->isInsert() ? 1 : 0);
return parent::_postSave();
}