本文整理汇总了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;
}