File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,19 @@ public function getAvailableStyles() {
9191 return $ this ->cslStorage ->loadMultiple ();
9292 }
9393
94+ /**
95+ * {@inheritdoc}
96+ */
97+ public function getEnabledStyles () {
98+ $ available_styles = $ this ->getAvailableStyles ();
99+ foreach ($ available_styles as $ key => $ style ) {
100+ if (!$ style ->status ()) {
101+ unset($ available_styles [$ key ]);
102+ }
103+ }
104+ return $ available_styles ;
105+ }
106+
94107 /**
95108 * {@inheritdoc}
96109 */
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ public function getFormId() {
6969 public function buildForm (array $ form , FormStateInterface $ form_state ) {
7070 /** @var \Drupal\citation_select\CitationStylerInterface $styler */
7171 $ citation_styler = $ this ->styler ;
72- $ citation_styles = $ citation_styler ->getAvailableStyles ();
72+ $ citation_styles = $ citation_styler ->getEnabledStyles ();
7373 $ csl_options = array_map (function ($ cs ) {
7474 return $ cs ->label ();
7575 }, $ citation_styles );
You can’t perform that action at this time.
0 commit comments