本文整理汇总了PHP中SugarFeed::pushFeed2方法的典型用法代码示例。如果您正苦于以下问题:PHP SugarFeed::pushFeed2方法的具体用法?PHP SugarFeed::pushFeed2怎么用?PHP SugarFeed::pushFeed2使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SugarFeed
的用法示例。
在下文中一共展示了SugarFeed::pushFeed2方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pushFeed
public function pushFeed($bean, $event, $arguments)
{
$text = '';
if (empty($bean->fetched_row)) {
$text = 'New Application Uploaded [' . $bean->module_dir . ':' . $bean->id . ':' . $bean->name . ']';
}
if (!empty($text)) {
SugarFeed::pushFeed2($text, $bean);
}
}
示例2: pushFeed
function pushFeed($bean, $event, $arguments)
{
$text = '';
if (empty($bean->fetched_row)) {
$text = '{SugarFeed.CREATED_CONTACT} [' . $bean->module_dir . ':' . $bean->id . ':' . $bean->first_name . ' ' . $bean->last_name . ']';
}
if (!empty($text)) {
SugarFeed::pushFeed2($text, $bean);
}
}
示例3: pushFeed
function pushFeed($bean, $event, $arguments)
{
global $locale;
$text = '';
if (empty($bean->fetched_row)) {
$text = '{SugarFeed.CREATED_ACCOUNT} [' . $bean->module_dir . ':' . $bean->id . ':' . $bean->name . ']';
}
if (!empty($text)) {
SugarFeed::pushFeed2($text, $bean);
}
}
示例4: pushFeed
function pushFeed($bean, $event, $arguments)
{
$text = '';
if (empty($bean->fetched_row)) {
$text = '{SugarFeed.CREATED_CASE} [' . $bean->module_dir . ':' . $bean->id . ':' . $bean->name . '] {SugarFeed.FOR} [Accounts:' . $bean->account_id . ':' . $bean->account_name . ']<br>' . $bean->description;
} else {
if (!empty($bean->fetched_row['status']) && $bean->fetched_row['status'] != $bean->status && $bean->status == 'Closed') {
$text = '{SugarFeed.CLOSED_CASE} [' . $bean->module_dir . ':' . $bean->id . ':' . $bean->name . '] {SugarFeed.FOR} [Accounts:' . $bean->account_id . ':' . $bean->account_name . ']';
}
}
if (!empty($text)) {
SugarFeed::pushFeed2($text, $bean);
}
}
示例5: testpushFeed2
public function testpushFeed2()
{
$lead = new Lead();
$lead->id = 1;
$lead->assigned_user_id = 1;
SugarFeed::pushFeed2('some text 2', $lead, 'Link', 'some url');
//retrieve newly created bean
$sugarFeed = new SugarFeed();
$result = $sugarFeed->retrieve_by_string_fields(array('related_id' => '1', 'related_module' => 'Leads'));
//test for record ID to verify that record is saved
$this->assertTrue(isset($sugarFeed->id));
$this->assertEquals(36, strlen($sugarFeed->id));
//mark the record as deleted
$sugarFeed->mark_deleted($sugarFeed->id);
}
示例6: pushFeed
function pushFeed($bean, $event, $arguments)
{
global $locale;
$text = '';
if (empty($bean->fetched_row)) {
$full_name = $locale->getLocaleFormattedName($bean->first_name, $bean->last_name, '');
$text = '{SugarFeed.CREATED_LEAD} [' . $bean->module_dir . ':' . $bean->id . ':' . $full_name . ']';
} else {
if (!empty($bean->fetched_row['status']) && $bean->fetched_row['status'] != $bean->status && $bean->status == 'Converted') {
// Repeated here so we don't format the name on "uninteresting" events
$full_name = $locale->getLocaleFormattedName($bean->first_name, $bean->last_name, '');
$text = '{SugarFeed.CONVERTED_LEAD} [' . $bean->module_dir . ':' . $bean->id . ':' . $full_name . ']';
}
}
if (!empty($text)) {
SugarFeed::pushFeed2($text, $bean);
}
}
示例7: pushFeed
function pushFeed($bean, $event, $arguments)
{
$text = '';
if (empty($bean->fetched_row)) {
$currency = new Currency();
$currency->retrieve($bean->currency_id);
$text = '{SugarFeed.CREATED_OPPORTUNITY} [' . $bean->module_dir . ':' . $bean->id . ':' . $bean->name . '] {SugarFeed.WITH} [Accounts:' . $bean->account_id . ':' . $bean->account_name . '] {SugarFeed.FOR} ' . $currency->symbol . format_number($bean->amount);
} else {
if (!empty($bean->fetched_row['sales_stage']) && $bean->fetched_row['sales_stage'] != $bean->sales_stage && $bean->sales_stage == 'Closed Won') {
$currency = new Currency();
$currency->retrieve($bean->currency_id);
$text = '{SugarFeed.WON_OPPORTUNITY} [' . $bean->module_dir . ':' . $bean->id . ':' . $bean->name . '] {SugarFeed.WITH} [Accounts:' . $bean->account_id . ':' . $bean->account_name . '] {SugarFeed.FOR} ' . $currency->symbol . format_number($bean->amount);
}
}
if (!empty($text)) {
SugarFeed::pushFeed2($text, $bean);
}
}
示例8: pushFeed
function pushFeed($bean, $event, $arguments)
{
$text = '';
if (empty($bean->fetched_row) && $bean->in_save) {
$accountName = $bean->account_name;
if (empty($accountName) && $bean->account_id) {
$acc = BeanFactory::getBean('Accounts', $bean->account_id);
$accountName = $acc->name;
}
$text = '{SugarFeed.CREATED_CASE} [' . $bean->module_dir . ':' . $bean->id . ':' . $bean->name . '] {SugarFeed.FOR} [Accounts:' . $bean->account_id . ':' . $accountName . ']: ' . $bean->description;
} else {
if (!empty($bean->fetched_row['status']) && $bean->fetched_row['status'] != $bean->status && strpos($bean->status, 'Closed') !== false) {
$text = '{SugarFeed.CLOSED_CASE} [' . $bean->module_dir . ':' . $bean->id . ':' . $bean->name . '] {SugarFeed.FOR} [Accounts:' . $bean->account_id . ':' . $bean->account_name . ']';
}
}
if (!empty($text)) {
SugarFeed::pushFeed2($text, $bean);
}
}
示例9: pushFeed
function pushFeed($bean, $event, $arguments)
{
global $locale;
$text = '';
if (empty($bean->fetched_row)) {
$text = '{SugarFeed.CREATED_ACTIVITY} [' . $bean->module_dir . ':' . $bean->id . ':' . $locale->getLocaleFormattedName($bean->first_name, $bean->last_name) . ']';
}
if (!empty($text)) {
SugarFeed::pushFeed2($text, $bean);
}
}