@@ -73,11 +73,6 @@ public function generate(\PHPFUI\Instadoc\PageInterface $page, string $fullClass
73
73
$ container ->add ($ row );
74
74
}
75
75
76
- $ table = new \PHPFUI \Table ();
77
- $ table ->addClass ('hover ' );
78
- $ table ->addClass ('unstriped ' );
79
- $ table ->addClass ('stack ' );
80
-
81
76
$ parent = $ this ->reflection ->getParentClass ();
82
77
83
78
$ parentNames = [];
@@ -91,38 +86,49 @@ public function generate(\PHPFUI\Instadoc\PageInterface $page, string $fullClass
91
86
}
92
87
}
93
88
94
- $ extends = $ this ->section ('Extends ' );
89
+ $ accordion = new \PHPFUI \Accordion ();
90
+ $ accordion ->addAttribute ('data-multi-expand ' , 'true ' );
91
+ $ accordion ->addAttribute ('data-allow-all-closed ' , 'true ' );
92
+
93
+ $ table = new \PHPFUI \Table ();
94
+ $ table ->addClass ('hover ' );
95
+ $ table ->addClass ('unstriped ' );
95
96
96
97
foreach (array_reverse ($ parentNames ) as $ name )
97
98
{
98
- $ table ->addRow ([$ extends , $ this ->getClassName ($ name )]);
99
- $ extends = '' ;
99
+ $ table ->addRow ([$ this ->getClassName ($ name )]);
100
100
}
101
+ $ accordion ->addTab ('Extends ' , $ table );
102
+
101
103
102
- $ children = $ this ->section ('Children ' );
104
+ $ table = new \PHPFUI \Table ();
105
+ $ table ->addClass ('hover ' );
106
+ $ table ->addClass ('unstriped ' );
103
107
104
108
foreach (\PHPFUI \InstaDoc \ChildClasses::getChildClasses ($ this ->class ) as $ class )
105
109
{
106
- $ table ->addRow ([$ children , $ this ->getClassName ($ class )]);
107
- $ children = '' ;
110
+ $ table ->addRow ([$ this ->getClassName ($ class )]);
108
111
}
112
+ $ accordion ->addTab ('Children ' , $ table );
109
113
110
114
$ interfaces = $ this ->reflection ->getInterfaces ();
111
115
112
116
if ($ interfaces )
113
117
{
114
118
ksort ($ interfaces , SORT_FLAG_CASE | SORT_STRING );
115
- $ section = 'Implements ' ;
119
+ $ table = new \PHPFUI \Table ();
120
+ $ table ->addClass ('hover ' );
121
+ $ table ->addClass ('unstriped ' );
116
122
117
123
foreach ($ interfaces as $ interface )
118
124
{
119
125
$ class = $ interface ->getName ();
120
- $ table ->addRow ([$ this ->section ($ section ), $ this ->getClassName ($ interface ->getName ())]);
121
- $ section = '' ;
126
+ $ table ->addRow ([$ this ->getClassName ($ interface ->getName ())]);
122
127
}
128
+ $ accordion ->addTab ('Implements ' , $ table );
123
129
}
124
130
125
- $ container ->add ($ table );
131
+ $ container ->add ($ accordion );
126
132
127
133
$ parent = $ this ->reflection ->getParentClass ();
128
134
0 commit comments