Ejemplo n.º 1
0
 public function init()
 {
     parent::init();
     /*
      * Initial instance of social plugin
      */
     $this->_social = HTS_Api::getInstance()->getSocialPlugin();
     $this->view->social = $this->_social;
     /*
      * Initial layout
      */
     $this->_helper->layout->setLayout('hts_canvas');
     /*
      * Check user authorize apps 
      */
     $this->_authenticate();
     $this->_authorize();
     /*
      * Get user infomation
      */
     $this->_id_user = $this->_social->getIdUser();
     $this->_id_social = $this->_social->getIdSocial();
     $this->_user = $this->_social->getUser();
     /*
      * Get all params
      */
     $this->_params = $this->_getAllParams();
     $this->_params['id_user'] = $this->_id_user;
     $this->_params['id_social'] = $this->_id_social;
     Zend_Registry::set('params', $this->_params);
     /*
      * Initial translate language
      */
     $this->_initTranslator();
 }