本文整理汇总了PHP中Gpf_Plugins_Engine::extensionPoint方法的典型用法代码示例。如果您正苦于以下问题:PHP Gpf_Plugins_Engine::extensionPoint方法的具体用法?PHP Gpf_Plugins_Engine::extensionPoint怎么用?PHP Gpf_Plugins_Engine::extensionPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gpf_Plugins_Engine
的用法示例。
在下文中一共展示了Gpf_Plugins_Engine::extensionPoint方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildWhere
protected function buildWhere()
{
parent::buildWhere();
$this->_selectBuilder->where->add('l.logout', 'is', 'NULL', 'AND', false);
$this->_selectBuilder->where->add(Gpf_Db_Table_LoginsHistory::LAST_REQUEST, '>', "('" . $this->createDatabase()->getDateString() . "' - INTERVAL 1800 SECOND)", 'AND', false);
Gpf_Plugins_Engine::extensionPoint('Gpf_Report_OnlineUsers.buildWhere', $this->_selectBuilder->where);
}
示例2: initTransTypes
private function initTransTypes() {
$this->addTransType(Pap_Common_Constants::TYPE_CLICK);
$this->addTransType(Pap_Common_Constants::TYPE_SALE);
$this->addTransType(Pap_Common_Constants::TYPE_REFUND);
$this->addTransType(Pap_Common_Constants::TYPE_CHARGEBACK);
Gpf_Plugins_Engine::extensionPoint('PostAffiliate.Stats.initTransactionTypes', $this);
}
示例3: getCommissionGroup
/**
* returns commission group for user (if not set already)
* Commission group can be set previously in the checkCampaignType() function
*
*/
protected function getCommissionGroup(Pap_Contexts_Tracking $context) {
$context->debug('Recognizing commission group started');
if (($user = $context->getUserObject()) == null) {
$context->debug('STOPPING, user is not set - cannot find commission group');
return;
}
$commGroupId = $this->getUserCommissionGroupFromCache($context->getCampaignObject(), $user->getId());
if($commGroupId == false) {
$context->debug("STOPPING, Cannot find commission group for this affiliate and campaign! ".$context->getCampaignObject()->getId().' - '.$user->getId());
$context->setDoCommissionsSave(false);
$context->setDoTrackerSave(false);
return;
}
Gpf_Plugins_Engine::extensionPoint('PostAffiliate.RecognizeCommGroup.getCommissionGroup', $context);
$commissionGroup = $this->getCommissionGroupFromCache($commGroupId);
if ($commissionGroup == null) {
$context->debug(' Commission group with ID '.$commGroupId . ' does not exist');
return;
}
$context->setCommissionGroup($commissionGroup);
$context->debug('Received commission group ID = '.$commGroupId);
}
示例4: load
/**
* @anonym
* @service
* @param $fields
*/
public function load(Gpf_Rpc_Params $params) {
$form = new Gpf_Rpc_Form($params);
Gpf_Plugins_Engine::extensionPoint('PostAffiliate.CommissionTypeEditAdditionalForm.load', $form);
return $form;
}
示例5: buildGroupBy
protected function buildGroupBy($groupColumn) {
$this->statsSelect->groupBy->add(self::TRANSACTIONS_PREFIX.'.groupColumn');
$this->transactionsSelect->groupBy->add(Pap_Db_Table_Transactions::TRANSACTION_ID);
$this->transactionsSelect->groupBy->add(Pap_Db_Table_Transactions::TIER);
$transactionsStatsBuilderContext = new Pap_Stats_Computer_TransactionsStatsBuilderContext($this, $groupColumn);
Gpf_Plugins_Engine::extensionPoint('Pap_Stats_Computer_TransactionsStatsBuilder.buildGroupBy', $transactionsStatsBuilderContext);
}
示例6: save
/**
* @service fraud_protection write
* @param $fields
*/
public function save(Gpf_Rpc_Params $params) {
$form = new Gpf_Rpc_Form($params);
Gpf_Settings::set(Pap_Settings::BANNEDIPS_LIST_SIGNUPS,
$form->getFieldValue(Pap_Settings::BANNEDIPS_LIST_SIGNUPS));
Gpf_Settings::set(Pap_Settings::BANNEDIPS_SIGNUPS,
$form->getFieldValue(Pap_Settings::BANNEDIPS_SIGNUPS));
Gpf_Settings::set(Pap_Settings::BANNEDIPS_SIGNUPS_ACTION,
$form->getFieldValue(Pap_Settings::BANNEDIPS_SIGNUPS_ACTION));
Gpf_Settings::set(Pap_Settings::REPEATING_SIGNUPS_SETTING_NAME,
$form->getFieldValue(Pap_Settings::REPEATING_SIGNUPS_SETTING_NAME));
Gpf_Settings::set(Pap_Settings::REPEATING_SIGNUPS_SECONDS_SETTING_NAME,
$form->getFieldValue(Pap_Settings::REPEATING_SIGNUPS_SECONDS_SETTING_NAME));
Gpf_Settings::set(Pap_Settings::REPEATING_SIGNUPS_ACTION_SETTING_NAME,
$form->getFieldValue(Pap_Settings::REPEATING_SIGNUPS_ACTION_SETTING_NAME));
Gpf_Plugins_Engine::extensionPoint('FraudProtectionSignupsForm.save', $form);
$form->setInfoMessage($this->_("Fraud protections saved"));
return $form;
}
示例7: loadFullStatistics
/**
*
* @service banner_stats read
* @param $data
*/
public function loadFullStatistics(Gpf_Rpc_Params $params) {
$data = new Gpf_Rpc_Data($params);
$select = new Gpf_SqlBuilder_SelectBuilder();
$select->from->add(Pap_Db_Table_Banners::getName());
$select->select->add("COUNT(".Pap_Db_Table_Banners::ID.")", "count");
$select->select->add(Pap_Db_Table_Banners::TYPE, 'type');
$select->groupBy->add(Pap_Db_Table_Banners::TYPE);
Gpf_Plugins_Engine::extensionPoint('AffiliateNetwork.modifyWhere',
new Gpf_Common_SelectBuilderCompoundRecord($select, new Gpf_Data_Record(array(), array())));
$result = $select->getAllRowsIndexedBy('type');
$bannerTypes = explode(',', $data->getParam('bannerTypes'));
$bannersCount = 0;
foreach ($bannerTypes as $bannerType) {
$bannerTypeCount = 0;
try {
$bannerTypeCount = $result->getRecord($bannerType)->get('count');
} catch (Gpf_Data_RecordSetNoRowException $e) {
}
$data->setValue($bannerType, "$bannerTypeCount");
$bannersCount += $bannerTypeCount;
}
$data->setValue("bannersCount", "$bannersCount");
return $data;
}
示例8: initConstraints
protected function initConstraints()
{
$this->addCascadeDeleteConstraint(self::ID, Gpf_Db_Table_PasswordRequests::AUTHUSERID, new Gpf_Db_PasswordRequest());
Gpf_Plugins_Engine::extensionPoint('AuthUsers.initConstraints', $this);
$this->addConstraint(new Gpf_DbEngine_Row_PasswordConstraint(self::PASSWORD));
$this->addConstraint(new Gpf_DbEngine_Row_UniqueConstraint(array(self::USERNAME)));
}
示例9: getUserById
/**
* gets user by user id
* @param $userId
* @return Pap_Affiliates_User
*/
public function getUserById($context, $id) {
if($id == '') {
return null;
}
if (isset($this->usersCache[$id])) {
return $this->usersCache[$id];
}
try {
$this->usersCache[$id] = $this->loadUserFromId($id);
return $this->usersCache[$id];
} catch (Gpf_Exception $e) {
$context->debug("User with RefId/UserId: $id doesn't exist");
$valueContext = new Gpf_Plugins_ValueContext(null);
$valueContext->setArray(array($id, $context));
Gpf_Plugins_Engine::extensionPoint('Tracker.RecognizeAffiliate.getUserById', $valueContext);
$user = $valueContext->get();
if (!is_null($user)) {
$this->usersCache[$id] = $user;
return $this->usersCache[$id];
}
return null;
}
}
示例10: show
public function show(Pap_Db_CachedBanner $cachedBanner) {
try {
$request = new Pap_Tracking_Request();
$banner = $this->getBanner($cachedBanner->getBannerId(), $cachedBanner->getUserId(), $cachedBanner->getChannel());
$req = new Pap_Tracking_BannerViewerRequest($banner->getBannerType());
Gpf_Plugins_Engine::extensionPoint(self::EXT_POINT_NAME, $req);
if($req->getViewer() != null) {
$req->getViewer()->showBanner($request , $banner);
return;
}
$this->prepareCachedBanner($banner, $cachedBanner);
try {
$cachedBanner->save();
} catch (Gpf_DbEngine_Row_ConstraintException $e) {
// cached banner was saved already by other script
}
if ($cachedBanner->getHeaders() != '') {
header($cachedBanner->getHeaders(), true);
}
echo $cachedBanner->getCode();
} catch (Exception $e) {
$this->logMessage($e);
echo $e;
}
}
示例11: createMenu
public function createMenu() {
$this->addItem('Home', $this->_('Home'));
$item = $this->addItem('Campaigns-Overview', $this->_('Campaigns'));
$item->addItem('Campaigns-Overview', $this->_('Overview'));
$item->addItem('Campaigns-Manager', $this->_('Campaigns Manager'));
$item = $this->addItem('Banners-Overview', $this->_('Banners'));
$item->addItem('Banners-Overview', $this->_('Overview'));
$item->addItem('Banner-Manager', $this->_('Banners Manager'));
$item = $this->addItem('Affiliates-Overview', $this->_('Affiliates'));
$item->addItem('Affiliates-Overview', $this->_('Overview'));
$item->addItem('Affiliate-Tree', $this->_('Affiliate tree'));
$item->addItem('Affiliate-Manager', $this->_('Affiliates Manager'));
$item->addItem('Direct-Links-Manager', $this->_('DirectLinks Urls'));
$item = $this->addItem('Transactions-Overview', $this->_('Transactions'));
$item->addItem('Transactions-Overview', $this->_('Overview'));
$item->addItem('Clicks-List', $this->_('Raw clicks list'));
$item->addItem('Transaction-Manager', $this->_('Commissions'));
$item = $this->addItem('Reports', $this->_('Reports'));
$item->addItem('Reports', $this->_('Overview'));
$item->addItem('Quick-Report', $this->_('Quick report'));
$item->addItem('Trends-Report', $this->_('Trends report'));
$item->addItem('Daily-Report', $this->_('Daily report'));
$item->addItem('Transaction-Manager', $this->_('Commissions'));
$item->addItem('Clicks-List', $this->_('Raw clicks list'));
$item->addItem('Payouts-History', $this->_('Payouts history'));
$item->addItem('Payouts-By-Affiliate', $this->_('Payouts by affiliate'));
$item->addItem('Online-Users', $this->_('Online users'));
$item->addItem('Top-Affiliates', $this->_('Top affiliates'));
$item->addItem('Top-referring-URLs', $this->_('Top referring URLs'));
$item = $this->addItem('Payouts', $this->_('Payouts'));
$item->addItem('Payouts', $this->_('Overview'));
$item->addItem('Pay-Affiliates', $this->_('Pay affiliates'));
$item = $this->addItem('Communication', $this->_('Emails'));
$item->addItem('Communication', $this->_('Overview'));
$item->addItem('Send-Message', $this->_('Send message'));
$item->addItem('Mail-Outbox', $this->_('Mail outbox'));
$this->addItem('Configuration-Manager', $this->_('Configuration'));
$item = $this->addItem('Tools', $this->_('Tools'));
$item->addItem('Tools', $this->_('Overview'));
$item->addItem('Integration', $this->_('Integration'));
$item->addItem('Logs-History', $this->_('Event logs'));
$item->addItem('Logins-History', $this->_('Logins history'));
$item->addItem('Import-Export', $this->_('Import / Export'));
$item->addItem('Getting-Started', $this->_('Getting started'));
$item->addItem('Visitor-Affiliates', $this->_('Visitor affiliates'));
$item->addItem('Views', $this->_('Views'));
$item->addItem('ReportProblems', $this->_('Report problems'));
Gpf_Plugins_Engine::extensionPoint('PostAffiliate.merchant.menu', $this);
}
示例12: loadDefaultCountry
/**
* @service country read
* @anonym
* @return Gpf_Rpc_Data
*/
public function loadDefaultCountry(Gpf_Rpc_Params $params)
{
$data = new Gpf_Rpc_Data($params);
$context = new Gpf_Plugins_ValueContext(Gpf_Settings::get(Gpf_Settings_Gpf::DEFAULT_COUNTRY));
Gpf_Plugins_Engine::extensionPoint('PostAffiliate.Countries.getDefaultCountry', $context);
$data->setValue('default', $context->get());
return $data;
}
示例13: createActionsList
protected static function createActionsList() {
$list = Pap_Features_PerformanceRewards_ActionList::getInstance(true);
$list->addAction('a1', 'Pap_Features_PerformanceRewards_Action_AddBonusCommAction', self::ACTION_PUT_ADD_BONUS);
$list->addAction('a2', 'Pap_Features_PerformanceRewards_Action_ChangeGroup', self::ACTION_PUT_AFFILIATE_INTO_COMMISSION_GROUP);
$list->addAction('a3', 'Pap_Features_PerformanceRewards_Action_ChangeGroupRetroactively', self::ACTION_PUT_AFFILIATE_INTO_COMMISSION_GROUP_RETROACTIVELY);
Gpf_Plugins_Engine::extensionPoint('PostAffiliate.Features.PerformanceRewards.Action.createActionList', $list);
}
示例14: initSelectClause
protected function initSelectClause() {
$this->selectBuilder->select->add(Pap_Db_Table_Transactions::R_STATUS, "status", 't');
$this->selectBuilder->select->add(Pap_Db_Table_Transactions::PAYOUT_STATUS, "payoutstatus", 't');
$this->selectBuilder->select->add("sum(if(t.".Pap_Db_Table_Transactions::TIER.">1,1,0))", "cnt");
$this->selectBuilder->select->add("sum(t.".Pap_Db_Table_Transactions::COMMISSION.")", "commission");
$this->selectBuilder->select->add("sum(if(t.tier>1,t.".Pap_Db_Table_Transactions::TOTAL_COST.",0))", "totalcost");
Gpf_Plugins_Engine::extensionPoint('PostAffiliate.Pap_Stats_Computer_Transactions.initSelectClause', $this->selectBuilder->select);
}
示例15: __construct
public function __construct($name, $panelName = '')
{
Smarty::Smarty();
$this->name = $name;
$this->panelName = $panelName;
$this->default_resource_type = 'template';
$this->security = true;
Gpf_Plugins_Engine::extensionPoint('Core.initSmarty', $this);
}