本文整理匯總了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);
}