reenadak

formatting in table view

Sep 25th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.50 KB | None | 0 0
  1. function initiateEditor()
  2. {
  3.           $tableColumns['url'] = array(
  4.                'display_text' => 'URL',
  5.                'perms' => 'EVCAXTQSFHO',
  6.                'table_fun' => array(&$this,'formatLink'),
  7.                'view_fun' => array(&$this,'formatLink')
  8.           );
  9.      ...
  10. }
  11.  
  12. function formatLink($col,$val,$row,$instanceName,$rowNum)
  13. {
  14.      $html = '';
  15.      if(strlen($val) > 0)
  16.      {
  17.           $html = '<a target="_blank" href="'.$val.'">'.$val.'</a>';
  18.      }
  19.      return $html;
  20. }
Add Comment
Please, Sign In to add comment