You are here

function backup_migrate_schedule::get_list_row in Backup and Migrate 8.3

Same name and namespace in other branches
  1. 8.2 includes/schedules.inc \backup_migrate_schedule::get_list_row()
  2. 6.3 includes/schedules.inc \backup_migrate_schedule::get_list_row()
  3. 6.2 includes/schedules.inc \backup_migrate_schedule::get_list_row()
  4. 7.3 includes/schedules.inc \backup_migrate_schedule::get_list_row()
  5. 7.2 includes/schedules.inc \backup_migrate_schedule::get_list_row()

Get a row of data to be used in a list of items of this type.

Overrides backup_migrate_item::get_list_row

File

includes/schedules.inc, line 181
All of the schedule handling code needed for Backup and Migrate.

Class

backup_migrate_schedule
A schedule class for crud operations.

Code

function get_list_row() {
  drupal_add_css(drupal_get_path('module', 'backup_migrate') . '/backup_migrate.css');
  $row = parent::get_list_row();
  if (!$this
    ->is_enabled()) {
    foreach ($row as $key => $field) {
      if (!is_array($field)) {
        $row[$key] = array(
          'data' => $field,
          'class' => 'schedule-list-disabled',
        );
      }
      else {
        if (isset($row[$key]['class'])) {
          $row[$key]['class'] .= ' schedule-list-disabled';
        }
        else {
          $row[$key]['class'] = 'schedule-list-disabled';
        }
      }
    }
  }
  return $row;
}