| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <?php defined('BX_DOL') or die('hack attempt');
- /**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup Polls Polls
- * @ingroup UnaModules
- *
- * @{
- */
- /**
- * Polls module
- */
- class BxPollsModule extends BxBaseModTextModule
- {
- function __construct(&$aModule)
- {
- parent::__construct($aModule);
- }
- /**
- * ACTION METHODS
- */
- public function actionGetBlock()
- {
- $iContentId = (int)bx_get('content_id');
- $sBlock = bx_process_input(bx_get('block'));
- $sMethod = 'serviceGetBlock' . bx_gen_method_name($sBlock);
- if(!method_exists($this, $sMethod))
- return echoJson(array());
- $aBlock = $this->$sMethod($iContentId);
- if(empty($aBlock) || !is_array($aBlock))
- return echoJson(array());
- return echoJson(array(
- 'content' => $aBlock['content']
- ));
- }
- /**
- * SERVICE METHODS
- */
- public function serviceGetBlockSubentries($iContentId = 0)
- {
- return $this->_serviceTemplateFunc('entrySubentries', $iContentId);
- }
- public function serviceGetBlockResults($iContentId = 0)
- {
- return $this->_serviceTemplateFunc('entryResults', $iContentId);
- }
- /**
- * INTERNAL METHODS
- */
-
- protected function _getImagesForTimelinePost($aEvent, $aContentInfo, $sUrl)
- {
- return array();
- }
- protected function _getContentForTimelinePost($aEvent, $aContentInfo)
- {
- return $this->_oTemplate->getContentForTimelinePost($aEvent, $aContentInfo);
- }
-
- }
- /** @} */
|