Ejemplo n.º 1
0
    /**
     * @return Gpf_DbEngine_Row
     */
    protected function createEmptyRow(Gpf_Rpc_Params $params) {
        $row = new Pap_Db_Channel();

        $userId = Gpf_Session::getAuthUser()->getPapUserId();

        $row->set(Pap_Db_Table_Channels::USER_ID, $userId);
        $row->set(Pap_Db_Table_Channels::NAME, $this->_("Channel name"));
        $row->set(Pap_Db_Table_Channels::VALUE, $this->generateDefaultValue($userId));
        return $row;
    }
 private function findChannel($channelId) {
 	$channel = new Pap_Db_Channel();
 	$channel->setPrimaryKeyValue($channelId);
 	$channel->set(Pap_Db_Table_Channels::USER_ID, Gpf_Session::getAuthUser()->getPapUserId());
 	try {
 		$channel->loadFromData(array('channelid', 'userid'));
 		return $channel;
 	} catch(Gpf_Exception $e) {
 	}
 	
 	return null;
 }
Ejemplo n.º 3
0
 private function setBannerChannel(Pap_Common_Banner $banner, $channel) {
     $dbChannel = new Pap_Db_Channel();
     $dbChannel->set(Pap_Db_Table_Channels::VALUE, $channel);
     try {
         $dbChannel->loadFromData(array(Pap_Db_Table_Channels::VALUE));
         $banner->setChannel($dbChannel);
     } catch (Exception $e) {
     }
 }