Skip to content

Instantly share code, notes, and snippets.

@jmertic
Created February 17, 2011 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmertic/832050 to your computer and use it in GitHub Desktop.
Save jmertic/832050 to your computer and use it in GitHub Desktop.
<?php
require_once('modules/SugarFeed/feedLogicBase.php');
class LeadFeed extends FeedLogicBase
{
public $module = 'Leads';
public 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 . ']';
}
if (!empty($text)) {
SugarFeed::pushFeed2($text, $bean);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment