-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathInfoModule6.php
More file actions
33 lines (27 loc) · 890 Bytes
/
InfoModule6.php
File metadata and controls
33 lines (27 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
namespace DrupalCodeBuilder\Generator;
/**
* Generator class for module info data for Drupal 6.
*/
class InfoModule6 extends InfoModule7 {
/**
* Create lines of file body for Drupal 6.
*/
function infoData(): array {
$lines = [];
$lines['name'] = $this->component_data['readable_name'];
$lines['description'] = $this->component_data['short_description'];
if (!empty( $this->component_data['module_dependencies'])) {
// For lines which form a set with the same key and array markers,
// simply make an array.
foreach ( $this->component_data['module_dependencies'] as $dependency) {
$lines['dependencies'][] = $dependency;
}
}
if (!empty( $this->component_data['module_package'])) {
$lines['package'] = $this->component_data['module_package'];
}
$lines['core'] = "6.x";
return $lines;
}
}