| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php defined('BX_DOL') or die('hack attempt');
- /**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup Ads Ads
- * @ingroup UnaModules
- *
- * @{
- */
- /**
- * Entry forms helper functions
- */
- class BxAdsFormsEntryHelper extends BxBaseModTextFormsEntryHelper
- {
- public function __construct($oModule)
- {
- parent::__construct($oModule);
- }
- public function getObjectFormAdd($sDisplay = false)
- {
- if(($sCategoryDisplay = $this->_oModule->getCategoryDisplay('add')) !== false)
- $sDisplay = $sCategoryDisplay;
- return parent::getObjectFormAdd($sDisplay);
- }
- public function onDataAddAfter($iAccountId, $iContentId)
- {
- $s = parent::onDataAddAfter($iAccountId, $iContentId);
- if(!empty($s))
- return $s;
- $this->_oModule->serviceUpdateCategoriesStats();
- return '';
- }
- public function onDataEditAfter($iContentId, $aContentInfo, $aTrackTextFieldsChanges, $oProfile, $oForm)
- {
- $s = parent::onDataEditAfter($iContentId, $aContentInfo, $aTrackTextFieldsChanges, $oProfile, $oForm);
- if(!empty($s))
- return $s;
- $this->_oModule->serviceUpdateCategoriesStats();
- return '';
- }
- public function onDataDeleteAfter ($iContentId, $aContentInfo, $oProfile)
- {
- $s = parent::onDataDeleteAfter ($iContentId, $aContentInfo, $oProfile);
- if(!empty($s))
- return $s;
- $this->_oModule->serviceUpdateCategoriesStats();
- return '';
- }
- }
- /** @} */
|