本文整理汇总了PHP中CustomView_Record_Model::getAll方法的典型用法代码示例。如果您正苦于以下问题:PHP CustomView_Record_Model::getAll方法的具体用法?PHP CustomView_Record_Model::getAll怎么用?PHP CustomView_Record_Model::getAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CustomView_Record_Model
的用法示例。
在下文中一共展示了CustomView_Record_Model::getAll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: beforeGetTaskform
public function beforeGetTaskform($viewer)
{
$fields = $this->get('fields');
if (empty($fields) || $fields == -1) {
$fields = array();
}
$viewer->assign("StaticFieldsField", 'fields');
$viewer->assign("fields", $fields);
$viewer->assign("fromFields", $this->getFromFields());
$viewer->assign("related_modules", VtUtils::getEntityModules(true));
$search_module = $this->get("search_module");
if (!empty($_POST["task"]["search_module"])) {
$parts = explode("#~#", $_POST["task"]["search_module"]);
} elseif (!empty($search_module)) {
if ($search_module != -1) {
$parts = explode("#~#", $search_module);
}
} else {
return;
}
$views = array();
$allviews = \CustomView_Record_Model::getAll($parts[0]);
foreach ($allviews as $view) {
$views[$view->get('cvid')] = $view->get('viewname');
}
$viewer->assign('customviews', $views);
if (!empty($parts)) {
$viewer->assign("related_tabid", $parts[1]);
$viewer->assign("target_module_name", $parts[0]);
}
}
示例2: beforeGetTaskform
public function beforeGetTaskform($viewer)
{
global $adb, $current_language, $mod_strings;
$viewer->assign("related_modules", VtUtils::getEntityModules(true));
$search_module = $this->get("search_module");
if (!empty($_POST["task"]["search_module"])) {
$parts = explode("#~#", $_POST["task"]["search_module"]);
} elseif (!empty($search_module)) {
if ($search_module != -1) {
$parts = explode("#~#", $search_module);
}
} else {
return;
}
if (!empty($parts)) {
$viewer->assign("related_tabid", $parts[1]);
$search_module_name = VtUtils::getModuleName($parts[1]);
#$workflowSettings = $this->getWorkflow()->getSettings();
$workflows = $workflows = Workflow2::getWorkflowsForModule($search_module_name, 1);
$viewer->assign("workflows", $workflows);
$fields = VtUtils::getFieldsWithBlocksForModule($search_module_name);
$viewer->assign("sort_fields", $fields);
$moduleObj = \Vtiger_Module_Model::getInstance($search_module_name);
$viewer->assign('productCache', array());
if ($moduleObj instanceof \Inventory_Module_Model) {
$viewer->assign('searchByProduct', true);
$product = $this->get('products');
if (!empty($product)) {
//$dataObj = \Vtiger_Record_Model::getInstanceById($product);
$productCache[$product] = array('label' => \Vtiger_Functions::getCRMRecordLabel($product));
$viewer->assign('productCache', $productCache);
}
}
$views = array();
$allviews = \CustomView_Record_Model::getAll($search_module_name);
foreach ($allviews as $view) {
$views[$view->get('cvid')] = $view->get('viewname');
}
$viewer->assign('customviews', $views);
}
}