BxDolTwigModule::serviceGetSpyData PHP Method

serviceGetSpyData() public method

public serviceGetSpyData ( )
    function serviceGetSpyData()
    {
        return array('handlers' => array(array('alert_unit' => $this->_sPrefix, 'alert_action' => 'add', 'module_uri' => $this->_aModule['uri'], 'module_class' => 'Module', 'module_method' => 'get_spy_post'), array('alert_unit' => $this->_sPrefix, 'alert_action' => 'change', 'module_uri' => $this->_aModule['uri'], 'module_class' => 'Module', 'module_method' => 'get_spy_post'), array('alert_unit' => $this->_sPrefix, 'alert_action' => 'join', 'module_uri' => $this->_aModule['uri'], 'module_class' => 'Module', 'module_method' => 'get_spy_post'), array('alert_unit' => $this->_sPrefix, 'alert_action' => 'rate', 'module_uri' => $this->_aModule['uri'], 'module_class' => 'Module', 'module_method' => 'get_spy_post'), array('alert_unit' => $this->_sPrefix, 'alert_action' => 'commentPost', 'module_uri' => $this->_aModule['uri'], 'module_class' => 'Module', 'module_method' => 'get_spy_post')), 'alerts' => array(array('unit' => $this->_sPrefix, 'action' => 'add'), array('unit' => $this->_sPrefix, 'action' => 'change'), array('unit' => $this->_sPrefix, 'action' => 'join'), array('unit' => $this->_sPrefix, 'action' => 'rate'), array('unit' => $this->_sPrefix, 'action' => 'delete'), array('unit' => $this->_sPrefix, 'action' => 'commentPost'), array('unit' => $this->_sPrefix, 'action' => 'commentRemoved')));
    }

Usage Example

Ejemplo n.º 1
0
 function serviceGetSpyData()
 {
     $aOld = parent::serviceGetSpyData();
     $aNew = array('handlers' => array(), 'alerts' => array());
     foreach ($aOld['handlers'] as $a) {
         if ('join' == $a['alert_action']) {
             continue;
         }
         $aNew['handlers'][] = $a;
     }
     foreach ($aOld['alerts'] as $a) {
         if ('join' == $a['action']) {
             continue;
         }
         $aNew['alerts'][] = $a;
     }
     return $aNew;
 }