本文整理汇总了PHP中Phalcon\Mvc\Model::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Model::delete方法的具体用法?PHP Model::delete怎么用?PHP Model::delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phalcon\Mvc\Model
的用法示例。
在下文中一共展示了Model::delete方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
public function delete()
{
foreach ($this->IgoListeValeur as $liste) {
$liste->delete();
}
return parent::delete();
}
示例2: delete
/**
* 删除模型
*
* @return bool
*/
public function delete()
{
if ($cache = static::getCache()) {
$cache->delete(static::$cacheChildNamespace, array($this->{static::$primaryKey}));
}
return parent::delete();
}
示例3: delete
public function delete()
{
foreach ($this->IgoGeometrie as $geometrie) {
$geometrie->delete();
}
return parent::delete();
}
示例4: delete
public function delete()
{
$ref = new ReflectionClass($this);
if ($ref->hasProperty('deleted_at')) {
return $this->deleted_at ? true : $this->save(['deleted_at' => date('Y-m-d H:i:s')]);
} else {
return parent::delete();
}
}
示例5: delete
public function delete()
{
$response = array();
if (parent::delete() == false) {
foreach (parent::getMessages() as $message) {
$response['errors'][] = (string) $message;
}
} else {
$response['msg'] = 'ok';
}
return $response;
}
示例6: deleteItem
/**
* @param Model $item
*
* @return bool Deletion succeeded/failed
*/
protected function deleteItem(Model $item)
{
return $item->delete();
}
示例7: delete
public function delete()
{
foreach ($this->IgoCoucheContexte as $groupe) {
$groupe->delete();
}
return parent::delete();
}
示例8: delete
public function delete()
{
foreach ($this->IgoCouche as $couche) {
$couche->delete();
}
foreach ($this->IgoAttribut as $attribut) {
$attribut->delete();
}
return parent::delete();
}
示例9: delete
public function delete()
{
foreach ($this->IgoCoucheContexte as $groupe) {
$groupe->delete();
}
foreach ($this->IgoPermission as $permission) {
$permission->delete();
}
foreach ($this->IgoClasse as $classe) {
$classe->delete();
}
return parent::delete();
}
示例10: deleteModel
/**
* Elimina el modelo pasado por parametro y carga el mensaje que ha sido pasado por párametro en el flashSession,
* En caso de error genera una excepción
* @param \Phalcon\Mvc\Model $model
* @param String $successMsg
* @return boolean
* @throws InvalidArgumentException
*/
protected function deleteModel($model, $successMsg)
{
if ($model->delete()) {
$this->flashSession->warning($successMsg);
return true;
}
$m = "";
foreach ($model->getMessages() as $msg) {
$m .= $msg . "<br>";
}
throw new InvalidArgumentException($m);
}