本文整理匯總了PHP中Vtiger_RelationListView_Model::getLinks方法的典型用法代碼示例。如果您正苦於以下問題:PHP Vtiger_RelationListView_Model::getLinks方法的具體用法?PHP Vtiger_RelationListView_Model::getLinks怎麽用?PHP Vtiger_RelationListView_Model::getLinks使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Vtiger_RelationListView_Model
的用法示例。
在下文中一共展示了Vtiger_RelationListView_Model::getLinks方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getLinks
/**
* Function to get the links for related list
* @return <Array> List of action models <Vtiger_Link_Model>
*/
public function getLinks()
{
$relationModel = $this->getRelationModel();
$parentModel = $this->getParentRecordModel();
$isSubProduct = false;
if ($parentModel->getModule()->getName() == $relationModel->getRelationModuleModel()->getName()) {
$isSubProduct = $relationModel->isSubProduct($parentModel->getId());
}
if (!$isSubProduct) {
return parent::getLinks();
}
}
示例2: getLinks
/**
* Function to get the links for related list
* @return <Array> List of action models <Vtiger_Link_Model>
*/
public function getLinks()
{
$relatedLinks = parent::getLinks();
$relationModel = $this->getRelationModel();
$relatedModuleName = $relationModel->getRelationModuleModel()->getName();
if (array_key_exists($relatedModuleName, $relationModel->getEmailEnabledModulesInfoForDetailView())) {
$currentUserPriviligesModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
if ($currentUserPriviligesModel->hasModulePermission(getTabid('Emails'))) {
$emailLink = Vtiger_Link_Model::getInstanceFromValues(array('linktype' => 'LISTVIEWBASIC', 'linklabel' => vtranslate('LBL_SEND_EMAIL', $relatedModuleName), 'linkurl' => "javascript:Campaigns_RelatedList_Js.triggerSendEmail('index.php?module={$relatedModuleName}&view=MassActionAjax&mode=showComposeEmailForm&step=step1','Emails');", 'linkicon' => ''));
$emailLink->set('_sendEmail', true);
$relatedLinks['LISTVIEWBASIC'][] = $emailLink;
}
}
return $relatedLinks;
}