Skip to content
CodeIgniter: Ability to add HTML attributes to a table row - extend CI_Table
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
MY_Table.php
README.md

README.md

codeigniter-table-rows

CodeIgniter: Ability to add HTML attributes to a table row - extend CI_Table

Add the MY_Table.php file to your Site's application/libraries folder.

The _prep_args method was updated so data can be passed for a row intended to have attributes such as class and id.

The generate method was updated so attributes such as class and id can be added to rows.

    //add the row to the rows array
    $rows[]=array('data'=>$row, 'class'=>'warning');
    echo $this->table->generate($rows);

or

    $this->table->add_row(array('data'=>$row, 'class'=>'warning'));
You can’t perform that action at this time.