本文整理汇总了PHP中Object::saveNew方法的典型用法代码示例。如果您正苦于以下问题:PHP Object::saveNew方法的具体用法?PHP Object::saveNew怎么用?PHP Object::saveNew使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Object
的用法示例。
在下文中一共展示了Object::saveNew方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveNew
/**
* @see parent::save()
*/
public function saveNew()
{
if (!$this->PostedAt) {
$this->PostedAt = time();
}
return parent::saveNew();
}
示例2: saveNew
/**
* @see parent::saveNew()
*/
public function saveNew()
{
if (!$this->Position) {
$this->Position = self::getLast($this, 'Position', array('ProductId = ' . $this->ProductId)) + 1;
}
return parent::saveNew();
}
示例3: saveNew
/**
* @see parent::saveNew()
*/
public function saveNew()
{
if (!$this->Type) {
$this->Type = self::CERTIFICATE;
}
$this->Position = self::getLast($this, 'Position', array('Type = ' . $this->Type)) + 1;
return parent::saveNew();
}
示例4: saveNew
/**
* @see parent::saveNew()
*/
public function saveNew()
{
$this->PostedAt = time();
$Article = new Article();
$arr = array();
foreach ($Article->findResult('Id', array('InSubscription = 1'), 'PostedAt desc') as $Article) {
$arr[] = $Article->Id;
}
$this->Articles = implode(',', $arr);
return parent::saveNew();
}
示例5: saveNew
/**
* @see parent::saveNew()
*/
public function saveNew()
{
$this->Position = intval(self::getLast($this, 'Position', array('CategoryId = ' . $this->CategoryId))) + 1;
return parent::saveNew();
}
示例6: saveNew
/**
* @see parent::saveNew()
*/
public function saveNew()
{
$this->Position = self::getLast($this, 'Position') + 1;
return parent::saveNew();
}
示例7: saveNew
/**
* @see parent::saveNew()
*/
public function saveNew()
{
$this->InSubscription = 1;
return parent::saveNew();
}
示例8: saveNew
/**
* @see parent::saveNew()
*/
public function saveNew()
{
$this->SentAt = time();
return parent::saveNew();
}