本文整理匯總了PHP中XenForo_DataWriter::_preSave方法的典型用法代碼示例。如果您正苦於以下問題:PHP XenForo_DataWriter::_preSave方法的具體用法?PHP XenForo_DataWriter::_preSave怎麽用?PHP XenForo_DataWriter::_preSave使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類XenForo_DataWriter
的用法示例。
在下文中一共展示了XenForo_DataWriter::_preSave方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _preSave
protected function _preSave()
{
$issueDate = $this->get('issue_date');
if (empty($issueDate)) {
$this->set('issue_date', XenForo_Application::$time);
}
parent::_preSave();
}
示例2: _preSave
protected function _preSave()
{
// if we are redirecting to a destination, make sure it is enabled
if ($this->get('redirect_destination')) {
// get the destination
$redirectDestination = $this->_getDestinationModel()->getDestinationById($this->get('redirect_destination'));
}
parent::_preSave();
}
示例3: _preSave
protected function _preSave()
{
$templateForHooks = $this->getExtraData(self::EXTRA_DATA_TEMPLATE_FOR_HOOKS);
if ($templateForHooks !== null) {
// this extra data has been set somehow
$this->set('template_for_hooks', $templateForHooks);
}
return parent::_preSave();
}
示例4: _preSave
protected function _preSave()
{
$this->_bumpAddOnVersionId();
$templateForHooks = $this->getExtraData(self::EXTRA_DATA_TEMPLATE_FOR_HOOKS);
if ($templateForHooks !== null) {
// this extra data has been set somehow
$this->set('template_for_hooks', $templateForHooks);
}
if ($this->get('widget_id') and !empty($this->_newData['xf_widget'])) {
WidgetFramework_Helper_LayoutEditor::keepWidgetChanges($this->get('widget_id'), $this, $this->_newData['xf_widget']);
}
parent::_preSave();
}