function run() { $site_pages = $this->_get_site_page_data(); if ($site_pages) { $ta = new TableAdmin(); $ta->init_view_no_db(array('page_url' => 'URL', 'created_by' => 'Created By Username', 'author' => 'Author', 'last_edited_by' => 'Last Edited Username', 'last_modified' => 'Last Modified'), true); $ta->set_data_from_array($site_pages); $ta->set_show_actions_first_cell(false); $ta->set_show_actions_last_cell(false); $ta->set_fields_that_allow_sorting(array('last_modified')); $ta->set_fields_to_entity_convert(array('created_by', 'author', 'last_edited_by', 'last_modified')); $ta->run(); } elseif (!$this->_get_validated_site_id()) { echo '<p>You can only use this module in the context of a Reason site to which you have proper access privileges.</p>'; } else { echo '<p>The site does not have any valid pages.</p>'; } }