<?php
if (!defined('BASEPATH'))
    exit('No direct script access allowed');

/**
 * @author Igor Ratsun
 */
class Rtfc_column_data extends \Rtgc_edit_link
{
    public function column($value = '', $data = array())
    {
        $decoded = array_values(json_decode(htmlspecialchars_decode($value), true));

        $new_value = '';
        if (isset($decoded[0])) {
            $new_value .= $decoded[0];
        }
        if (isset($decoded[1])) {
            $new_value .= ' ' . $decoded[1];
        }

        return parent::column((!empty($new_value) ? $new_value . ' ...' : get_instance()->lang->line('Empty')), $data);
    }
}