如何覆盖 SuiteCRM 中的弹出列表视图查询(listViewProcess)?
How to override popup list view query(listViewProcess) in SuiteCRM?
我正在尝试显示某个 WHERE 子句的弹出列表视图,但我的代码似乎没有被执行?
这是我 custom/MODULE_NAME/views/view 中的内容。popup.php:
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
class CustomRegistrationMetaViewPopup extends ViewPopup{
public function listViewProcess(){
parent::listViewProcess();
$this->params['custom_select'] = "select * ";
$this->params['custom_from'] = "from table ";
$this->where .= "where condition = 'Verified'";
}
function CustomRegistrationMetaViewPopup(){
parent::ViewPopup();
}
function preDisplay(){
parent::preDisplay();
}
}
我的函数从未被调用过。有什么想法吗?
您正在尝试覆盖列表视图中可用的 listViewProcess 函数。文件的正确位置是:custom\modules\MODULE_NAME\views\view.list.php
下面是帮助代码:
require_once('include/MVC/View/views/view.list.php');
class MODULE_NAMEViewList extends ViewList {
function listViewProcess() {
global $current_user;
$this->params['custom_where'] = ' AND module_name.name = "test" ';
parent::listViewProcess();
}
}
我正在尝试显示某个 WHERE 子句的弹出列表视图,但我的代码似乎没有被执行?
这是我 custom/MODULE_NAME/views/view 中的内容。popup.php:
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
class CustomRegistrationMetaViewPopup extends ViewPopup{
public function listViewProcess(){
parent::listViewProcess();
$this->params['custom_select'] = "select * ";
$this->params['custom_from'] = "from table ";
$this->where .= "where condition = 'Verified'";
}
function CustomRegistrationMetaViewPopup(){
parent::ViewPopup();
}
function preDisplay(){
parent::preDisplay();
}
}
我的函数从未被调用过。有什么想法吗?
您正在尝试覆盖列表视图中可用的 listViewProcess 函数。文件的正确位置是:custom\modules\MODULE_NAME\views\view.list.php
下面是帮助代码:
require_once('include/MVC/View/views/view.list.php');
class MODULE_NAMEViewList extends ViewList {
function listViewProcess() {
global $current_user;
$this->params['custom_where'] = ' AND module_name.name = "test" ';
parent::listViewProcess();
}
}