@@ -32,7 +32,8 @@ class ItunesRss extends Rss {
32
32
public function getItunesChannelFields () {
33
33
$ fields = [
34
34
'type ' ,
35
- 'owner ' ,
35
+ 'name ' ,
36
+ 'email ' ,
36
37
'author ' ,
37
38
'subtitle ' ,
38
39
'summary ' ,
@@ -53,6 +54,11 @@ public function getItunesChannelFields() {
53
54
protected function defineOptions () {
54
55
$ options = parent ::defineOptions ();
55
56
$ options ['image ' ] = ['default ' => '' ];
57
+ $ options ['name ' ] = ['default ' => '' ];
58
+ $ options ['email ' ] = ['default ' => '' ];
59
+ $ options ['category ' ] = ['default ' => '' ];
60
+ $ options ['sub_category ' ] = ['default ' => '' ];
61
+ $ options ['explicit ' ] = ['default ' => '' ];
56
62
57
63
return $ options ;
58
64
}
@@ -74,6 +80,20 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
74
80
'#description ' => $ this ->t ('This will appear in the RSS feed itself. ' ),
75
81
'#maxlength ' => 1024 ,
76
82
];
83
+ $ form ['name ' ] = [
84
+ '#type ' => 'textfield ' ,
85
+ '#title ' => $ this ->t ('Owner name. ' ),
86
+ '#default_value ' => $ this ->options ['name ' ],
87
+ '#description ' => $ this ->t ('This will appear in the RSS feed itself. ' ),
88
+ '#maxlength ' => 1024 ,
89
+ ];
90
+ $ form ['email ' ] = [
91
+ '#type ' => 'textfield ' ,
92
+ '#title ' => $ this ->t ('Owner email. ' ),
93
+ '#default_value ' => $ this ->options ['email ' ],
94
+ '#description ' => $ this ->t ('This will appear in the RSS feed itself. ' ),
95
+ '#maxlength ' => 1024 ,
96
+ ];
77
97
$ form ['category ' ] = [
78
98
'#type ' => 'textfield ' ,
79
99
'#title ' => $ this ->t ('Category ' ),
@@ -88,6 +108,12 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
88
108
'#description ' => $ this ->t ('This will appear in the RSS feed itself. ' ),
89
109
'#maxlength ' => 1024 ,
90
110
];
111
+ $ form ['explicit ' ] = [
112
+ '#type ' => 'checkbox ' ,
113
+ '#title ' => $ this ->t ('Explicit ' ),
114
+ '#default_value ' => $ this ->options ['explicit ' ],
115
+ '#description ' => $ this ->t ('This will appear in the RSS feed itself. ' ),
116
+ ];
91
117
}
92
118
93
119
/**
@@ -110,7 +136,8 @@ public function render() {
110
136
111
137
$ this ->namespaces = [
112
138
'xmlns:itunes ' => 'http://www.itunes.com/dtds/podcast-1.0.dtd ' ,
113
- 'version ' => '2.0 ' ,
139
+ 'xmlns:dc ' => 'http://purl.org/dc/elements/1.1/ ' ,
140
+ 'xmlns:atom ' => 'http://www.w3.org/2005/Atom ' ,
114
141
];
115
142
116
143
return $ build ;
0 commit comments