本文整理汇总了PHP中dbeav_model::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP dbeav_model::delete方法的具体用法?PHP dbeav_model::delete怎么用?PHP dbeav_model::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dbeav_model
的用法示例。
在下文中一共展示了dbeav_model::delete方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
function delete($filter, $subSdf = 'delete')
{
$bn = $this->get_branch_bn();
//------------------------------------
//同步删除视频文件
$obj = $this->app->model('sales_touchscreen');
$rs = $obj->dump($filter['ad_id']);
if (isset($rs) && is_array($rs)) {
//------------------------------------------------------
//检查权限
//如果当前登陆用户,是门店账号,但删除的资料不是该门店,
//即没有权限,退出。
if (strlen($bn) > 0) {
if ($bn != $rs['branch_bn']) {
return false;
}
}
//------------------------------------------------------
$vodfile = $rs['vodfile'];
if (strlen($vodfile) > 5) {
@unlink(ROOT_DIR . $vodfile);
}
}
//------------------------------------
return parent::delete($filter);
}
示例2: delete
public function delete($filter, $subSdf = 'delete')
{
if (parent::delete($filter)) {
kernel::single('site_module_base')->create_site_config();
return true;
} else {
return false;
}
}
示例3: delete
public function delete($filter, $subSdf = 'delete')
{
$hasroleMdl = app::get('desktop')->model('hasrole');
$roleId = $hasroleMdl->getList('role_id', array('role_id' => $filter['role_id']));
if ($roleId) {
$msg = "含有已被使用角色,不可以删除!";
throw new \logicException($msg);
}
return parent::delete($filter);
}
示例4: delete
function delete($filter, $subSdf = 'delete')
{
$o =& $this->app->model('goods_spec_index');
if ($o->dump($filter)) {
$this->recycle_msg = app::get('b2c')->_('规格已被商品使用');
return false;
}
$o = $this->app->model('spec_values');
$o->delete($filter);
return parent::delete($filter);
}
示例5: delete
function delete($filter)
{
$o =& $this->app->model('goods_spec_index');
if ($o->dump($filter)) {
$this->recycle_msg = '规格已被商品使用';
return false;
}
$o =& $this->app->model('spec_values');
$o->delete($filter);
return parent::delete($filter);
}
示例6: delete
public function delete($filter, $subSdf = 'delete')
{
$info = $this->getList('grade_name,default_grade', $filter);
foreach ($info as $value) {
if ($value['default_grade'] == 1) {
throw new \LogicException("[" . $value['grade_name'] . "]是系统等级,不可删除");
return false;
}
}
return parent::delete($filter);
}
示例7: delete
function delete($filter)
{
if ($id = $filter['type_id']) {
$list = $this->getRow('name,type_id', array('type_id' => $id, 'bydefault' => 'true'));
if ($list) {
$this->recycle_msg = app::get('starbuy')->_('系统默认标签不能删除');
return false;
}
}
parent::delete($filter);
}
示例8: delete
public function delete($filter, $subSdf = 'delete')
{
$rows = $this->getList('*', $filter);
$res = parent::delete($filter, $subSdf);
if ($res) {
foreach ($rows as $row) {
vmc::singleton('routeplus_rstatics')->del_dispatch($row['custom_url']);
vmc::singleton('routeplus_rstatics')->del_genurl($row['url']);
}
}
return $res;
}
示例9: delete
public function delete($filter, $subSdf = 'delete')
{
$rows = $this->getList('*', $filter);
$res = parent::delete($filter, $subSdf);
if ($res) {
foreach ($rows as $row) {
kernel::single('site_route_static')->del_dispatch($row['static']);
kernel::single('site_route_static')->del_genurl($row['url']);
}
}
return $res;
}
示例10: delete
/**
* delete 方法重载
*
* 根据条件删除条目
* 不可以由pipe控制
* 可以广播事件
*
* @param mixed $filter
* @param mixed $named_action
* @access public
* @return void
*/
public function delete($filter)
{
return parent::delete($filter);
}
示例11: delete
public function delete($filter, $subSdf = 'delete')
{
$rs = parent::delete($filter, $subSdf);
return $rs;
}
示例12: parent_delete
private function parent_delete($filter, $subSdf = array())
{
if ($filter['member_id'] == '-1') {
$arr = $_SESSION['b2c_cart_objects'][$filter['member_ident']];
if ($arr && is_array($arr)) {
foreach ($arr as $key => &$row) {
if ($row['obj_ident'] == $filter['obj_ident'] || empty($filter['obj_ident'])) {
unset($arr[$key]);
}
}
} else {
$arr = array($data);
}
$_SESSION['b2c_cart_objects'][$filter['member_ident']] = $arr;
return true;
} else {
$flag = parent::delete($filter, $subSdf);
if ($filter['member_ident']) {
$f = array('member_ident' => $filter['member_ident']);
}
if ($filter['member_id']) {
$f['member_id'] = $filter['member_id'];
}
$arr = parent::getList('*', $f);
#if( $arr )
$this->kv_instance()->store($this->kv_prefix, $arr);
#else
# $this->kv_instance()->delete( $this->kv_prefix );
return $flag;
}
}
示例13: delete
/**
* 移除节点
* @var int $node_id
* @access public
*/
public function delete($filter)
{
$rows = $this->getList('*', $filter);
foreach ($rows as $row) {
if ($this->has_chilren($row['node_id'])) {
trigger_error(app::get('content')->_("节点『") . $row['node_name'] . app::get('content')->_("』下存在子节点,不能删除"), E_USER_ERROR);
return false;
//存在子节点
}
}
$res = parent::delete($filter);
if ($res) {
foreach ($rows as $row) {
if ($row['parent_id'] > 0) {
$this->update_node_path($row['parent_id']);
}
//$this->upgrade_parent($row['node_id']);
kernel::single('content_article_node')->delete_node_kvstore($row['node_id']);
//todo: 清空kvstore值
}
kernel::single('content_article_node')->store_nodes_change();
return true;
} else {
return false;
}
}
示例14: delete
function delete($filter)
{
$this->db->exec('DELETE FROM ' . $this->table_name(1) . ' WHERE goods_id IN (' . $this->_filter($filter) . ') ');
return parent::delete($filter);
}
示例15: delete
/**
* 删除数据.
*
* @param array $filter 符合删除的条件
*
* @return bool 返回删除结果
*/
public function delete($filter, $subSdf = 'delete')
{
$rows = $this->getList('article_id', $filter);
if (parent::delete($filter)) {
foreach ($rows as $row) {
vmc::singleton('content_article_detail')->delete_index_kvstore($row['article_id']);
vmc::singleton('content_article_detail')->delete_body_kvstore($row['article_id']);
}
vmc::singleton('content_article_detail')->store_detail_change();
return true;
} else {
return false;
}
}