Projet

Général

Profil

Révision 7e72b748

Ajouté par Assos Assos il y a plus de 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/ctools/ctools_custom_content/plugins/export_ui/ctools_custom_content_ui.class.php
2 2

  
3 3
class ctools_custom_content_ui extends ctools_export_ui {
4 4

  
5
  function edit_form(&$form, &$form_state) {
5
  public function edit_form(&$form, &$form_state) {
6 6
    // Correct for an error that came in because filter format changed.
7 7
    if (is_array($form_state['item']->settings['body'])) {
8 8
      $form_state['item']->settings['format'] = $form_state['item']->settings['body']['format'];
......
54 54
    );
55 55
  }
56 56

  
57
  function edit_form_submit(&$form, &$form_state) {
57
  public function edit_form_submit(&$form, &$form_state) {
58 58
    parent::edit_form_submit($form, $form_state);
59 59

  
60 60
    // Since items in our settings are not in the schema, we have to do these manually:
......
65 65
    $form_state['item']->settings['substitute'] = $form_state['values']['substitute'];
66 66
  }
67 67

  
68
  function list_form(&$form, &$form_state) {
68
  public function list_form(&$form, &$form_state) {
69 69
    parent::list_form($form, $form_state);
70 70

  
71 71
    $options = array('all' => t('- All -'));
......
82 82
    );
83 83
  }
84 84

  
85
  function list_filter($form_state, $item) {
85
  public function list_filter($form_state, $item) {
86 86
    if ($form_state['values']['category'] != 'all' && $form_state['values']['category'] != $item->category) {
87 87
      return TRUE;
88 88
    }
......
90 90
    return parent::list_filter($form_state, $item);
91 91
  }
92 92

  
93
  function list_sort_options() {
93
  public function list_sort_options() {
94 94
    return array(
95 95
      'disabled' => t('Enabled, title'),
96 96
      'title' => t('Title'),
......
100 100
    );
101 101
  }
102 102

  
103
  function list_build_row($item, &$form_state, $operations) {
104
    // Set up sorting
103
  public function list_build_row($item, &$form_state, $operations) {
104
    // Set up sorting.
105 105
    switch ($form_state['values']['order']) {
106 106
      case 'disabled':
107 107
        $this->sorts[$item->name] = empty($item->disabled) . $item->admin_title;
108 108
        break;
109

  
109 110
      case 'title':
110 111
        $this->sorts[$item->name] = $item->admin_title;
111 112
        break;
113

  
112 114
      case 'name':
113 115
        $this->sorts[$item->name] = $item->name;
114 116
        break;
117

  
115 118
      case 'category':
116 119
        $this->sorts[$item->name] = $item->category;
117 120
        break;
121

  
118 122
      case 'storage':
119 123
        $this->sorts[$item->name] = $item->type . $item->admin_title;
120 124
        break;
......
134 138
    );
135 139
  }
136 140

  
137
  function list_table_header() {
141
  public function list_table_header() {
138 142
    return array(
139 143
      array('data' => t('Name'), 'class' => array('ctools-export-ui-name')),
140 144
      array('data' => t('Title'), 'class' => array('ctools-export-ui-title')),

Formats disponibles : Unified diff