tomasnorre

Realurl Condig userFunc

Jul 9th, 2012
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.73 KB | None | 0 0
  1. // realurl_conf.php
  2. // .. snip begin
  3. 'postVarSets' => array(
  4.     '_DEFAULT' => array(
  5.         'ean' =>
  6.             array(
  7.                 'GETvar' => 'tx_niblucherproductimport_pi1[product]',
  8.                 'userFunc' => 'EXT:ni_blucher_productimport/class.user_blucher_realurl.php:&user_blucher_realurl->eanMain'
  9.             ),
  10.         ),
  11.     ),             
  12.  
  13. // ... snip end
  14.  
  15.  
  16. // declared in file, class.user_blucher_realurl.php
  17.  
  18. class user_blucher_realurl {
  19.  
  20.     function eanMain($params, $pObj) {
  21.        
  22.         die('Start eanMain()');
  23.        
  24.         return ($params['decodeAlias'] ? $this->ean2productId($params['value']) : $this->productId2ean($params['value']));
  25.     }
  26.  
  27.     function ean2productId($value) {
  28.         die('ean2productId()')
  29.     }
  30.  
  31.     function productId2ean($value) {
  32.         die('productId2ean()');
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment