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