Révision 18596a08
Ajouté par Assos Assos il y a presque 7 ans
drupal7/sites/all/modules/media/includes/media.fields.inc | ||
---|---|---|
116 | 116 |
'max_filesize' => isset($field_settings['max_filesize']) ? $field_settings['max_filesize'] : 0, |
117 | 117 |
'uri_scheme' => !empty($field['settings']['uri_scheme']) ? $field['settings']['uri_scheme'] : file_default_scheme(), |
118 | 118 |
'multiselect' => $multiselect, |
119 |
'field' => $field['field_name'], |
|
119 | 120 |
), |
120 | 121 |
), |
121 | 122 |
// Allows this field to return an array instead of a single value. |
... | ... | |
137 | 138 |
} elseif ($element['#entity_type'] == 'field_collection_item' && !empty($form['#entity']) && property_exists($form['#entity'], 'language')) { |
138 | 139 |
$element['#media_parent_entity_form_langcode'] = $form['#entity']->language; |
139 | 140 |
} |
141 |
else if ($element['#entity_type'] == 'paragraphs_item' && !empty($form['#entity'])) { |
|
142 |
$host = $element['#entity']->hostEntity(); |
|
143 |
$element['#media_parent_entity_form_langcode'] = $host->language; |
|
144 |
$element['#media_parent_entity_source_langcode'] = $host->language; |
|
145 |
} |
|
140 | 146 |
|
141 | 147 |
// Add image field specific validators. |
142 | 148 |
if ($field['type'] == 'image') { |
... | ... | |
551 | 557 |
); |
552 | 558 |
} |
553 | 559 |
|
560 |
$table = array('header' => $headers, 'rows' => $rows, 'attributes' => array('id' => $table_id)); |
|
561 |
|
|
562 |
drupal_alter('media_widget_multiple', $table, $element); |
|
563 |
|
|
554 | 564 |
drupal_add_tabledrag($table_id, 'order', 'sibling', $weight_class); |
555 | 565 |
|
556 | 566 |
$output = ''; |
557 |
$output = empty($rows) ? '' : theme('table', array('header' => $headers, 'rows' => $rows, 'attributes' => array('id' => $table_id)));
|
|
567 |
$output = empty($rows) ? '' : theme('table', $table);
|
|
558 | 568 |
$output .= drupal_render_children($element); |
559 | 569 |
return $output; |
560 | 570 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules