Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 8th, 2012  |  syntax: None  |  size: 0.84 KB  |  views: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php defined('SYSPATH') or die('No direct access allowed.');
  2.  
  3. class Sofia_Plugin extends Bluebox_Plugin
  4. {
  5.     protected $name = 'sofia';
  6.    
  7.     public function index()
  8.     {
  9.         $this->grid->add('sofia_status', 'Status', array(
  10.                 'align' => 'center',
  11.                 'search' => false,
  12.                 'sortable' => false,
  13.                 'callback' => array(
  14.                     'function' => array($this, '_showStatus'),
  15.                     'arguments' => array('plugins', 'User/location_id')
  16.                 )
  17.             )
  18.         );
  19.     }
  20.    
  21.     public function _showStatus($null, $plugins, $location_id)
  22.     {
  23.         if (empty($plugins['sip']))
  24.         {
  25.             return;
  26.         }
  27.  
  28.         $sip = $plugins['sip'];
  29.  
  30.         return $sip['username'] .'@' .'${location_' .$location_id .'}';
  31.     }
  32. }
clone this paste RAW Paste Data