Completed
Branch dev (a3767f)
by Michael
40:38
created
form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRow.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
         $_aParameters = func_get_args() + array( 
34 34
             $this->aFieldset, 
35
-            $this->aSavedData,    // passed by reference. @todo: examine why it needs to be passed by reference.
35
+            $this->aSavedData, // passed by reference. @todo: examine why it needs to be passed by reference.
36 36
             $this->aFieldErrors, 
37 37
             $this->aFieldTypeDefinitions, 
38 38
             $this->aCallbacks, // field output element callables.        
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         return $this->_getFieldByContainer( 
72 72
             $aFieldset, 
73 73
             array(
74
-                'open_main'     => "<div " . $_oFieldrowAttribute->get() . ">",
74
+                'open_main'     => "<div ".$_oFieldrowAttribute->get().">",
75 75
                 'close_main'    => "</div>",
76 76
             )
77 77
         ); 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         
62 62
         $aFieldset = $this->aFieldset;
63 63
 
64
-        if ( 'section_title' === $aFieldset[ 'type' ] ) { 
64
+        if ( 'section_title' === $aFieldset[ 'type' ] ) {
65 65
             return ''; 
66 66
         }
67 67
         
Please login to merge, or discard this patch.
form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRows.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      * @return      string
58 58
      * @since       DEVVER
59 59
      */
60
-    public function get( $bTableRow=true ) {
60
+    public function get( $bTableRow = true ) {
61 61
         
62 62
         $_sMethodName = $this->getAOrB(
63 63
             $bTableRow,
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         );
67 67
         
68 68
         $_aOutput = array();
69
-        foreach( $this->aFieldsetsPerSection as $_aFieldset ) {
69
+        foreach ( $this->aFieldsetsPerSection as $_aFieldset ) {
70 70
 
71 71
             $_oFieldsetOutputFormatter = new AdminPageFramework_Form_Model___Format_FieldsetOutput(
72 72
                 $_aFieldset, 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                 $this->aFieldTypeDefinitions
75 75
             );        
76 76
             
77
-            $_aOutput[] = call_user_func_array(
77
+            $_aOutput[ ] = call_user_func_array(
78 78
                 array( $this, $_sMethodName ),
79 79
                 array( $_oFieldsetOutputFormatter->get() )
80 80
             );
Please login to merge, or discard this patch.
form/_view/sectionset/AdminPageFramework_Form_View___FieldsetTableRow.php 2 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
         $_aParameters = func_get_args() + array( 
35 35
             $this->aFieldset, 
36
-            $this->aSavedData,    // passed by reference. @todo: examine why it needs to be passed by reference.
36
+            $this->aSavedData, // passed by reference. @todo: examine why it needs to be passed by reference.
37 37
             $this->aFieldErrors, 
38 38
             $this->aFieldTypeDefinitions, 
39 39
             $this->aCallbacks, // field output element callables.        
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
             return ''; 
66 66
         }
67 67
         
68
-        $_oFieldrowAttribute   = new AdminPageFramework_Form_View___Attribute_Fieldrow( 
68
+        $_oFieldrowAttribute = new AdminPageFramework_Form_View___Attribute_Fieldrow( 
69 69
             $aFieldset,
70 70
             array( 
71
-                'id'        => 'fieldrow-' . $aFieldset[ 'tag_id' ],
71
+                'id'        => 'fieldrow-'.$aFieldset[ 'tag_id' ],
72 72
                 'valign'    => 'top',
73 73
                 'class'     => 'admin-page-framework-fieldrow',
74 74
             )                
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         return $this->_getFieldByContainer( 
78 78
             $aFieldset, 
79 79
             array(
80
-                'open_container'    => "<tr " . $_oFieldrowAttribute->get() . ">",
80
+                'open_container'    => "<tr ".$_oFieldrowAttribute->get().">",
81 81
                 'close_container'   => "</tr>",
82 82
                 'open_title'        => "<th>",
83 83
                 'close_title'       => "</th>",
@@ -117,13 +117,13 @@  discard block
 block discarded – undo
117 117
                 'close_main'        => '',
118 118
             );
119 119
             
120
-            $_aOutput   = array();
120
+            $_aOutput = array();
121 121
             if ( $aFieldset[ 'show_title_column' ] ) {
122
-                $_aOutput[] = $aOpenCloseTags[ 'open_title' ]
122
+                $_aOutput[ ] = $aOpenCloseTags[ 'open_title' ]
123 123
                         . $this->_getFieldTitle( $aFieldset )
124 124
                     . $aOpenCloseTags[ 'close_title' ];
125 125
             }
126
-            $_aOutput[] = $aOpenCloseTags[ 'open_main' ]
126
+            $_aOutput[ ] = $aOpenCloseTags[ 'open_main' ]
127 127
                     // . call_user_func_array( $hfCallback, array( $aFieldset ) )
128 128
                     . $this->getFieldsetOutput( $aFieldset )
129 129
                 . $aOpenCloseTags[ 'close_main' ];
@@ -147,22 +147,22 @@  discard block
 block discarded – undo
147 147
                     $aField,
148 148
                     0   // the first item
149 149
                 );
150
-                return "<label for='" . $_oInputTagIDGenerator->get() . "'>"
151
-                        . "<a id='{$aField['field_id']}'></a>"  // to allow the browser to link to the element.
150
+                return "<label for='".$_oInputTagIDGenerator->get()."'>"
151
+                        . "<a id='{$aField[ 'field_id' ]}'></a>"  // to allow the browser to link to the element.
152 152
                         . "<span title='" 
153 153
                                 . esc_attr( strip_tags( 
154
-                                    isset( $aField['tip'] ) 
155
-                                        ? $aField['tip'] 
154
+                                    isset( $aField[ 'tip' ] ) 
155
+                                        ? $aField[ 'tip' ] 
156 156
                                         : ( 
157
-                                            is_array( $aField['description'] 
158
-                                                ? implode( '&#10;', $aField['description'] )
159
-                                                : $aField['description'] 
157
+                                            is_array( $aField[ 'description' ] 
158
+                                                ? implode( '&#10;', $aField[ 'description' ] )
159
+                                                : $aField[ 'description' ] 
160 160
                                             ) 
161 161
                                         ) 
162 162
                                 ) ) 
163 163
                             . "'>"
164
-                                . $aField['title'] 
165
-                            . ( in_array( $aField[ '_structure_type' ], array( 'widget', 'post_meta_box', 'page_meta_box' ) ) && isset( $aField['title'] ) && '' !== $aField['title']
164
+                                . $aField[ 'title' ] 
165
+                            . ( in_array( $aField[ '_structure_type' ], array( 'widget', 'post_meta_box', 'page_meta_box' ) ) && isset( $aField[ 'title' ] ) && '' !== $aField[ 'title' ]
166 166
                                 ? "<span class='title-colon'>:</span>" 
167 167
                                 : ''
168 168
                             )
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         
62 62
         $aFieldset = $this->aFieldset;
63 63
 
64
-        if ( 'section_title' === $aFieldset[ 'type' ] ) { 
64
+        if ( 'section_title' === $aFieldset[ 'type' ] ) {
65 65
             return ''; 
66 66
         }
67 67
         
Please login to merge, or discard this patch.
_abstract/form/_view/sectionset/AdminPageFramework_Form_View___Section.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -76,15 +76,15 @@  discard block
 block discarded – undo
76 76
         $_oSectionTableBodyAttributes = new AdminPageFramework_Form_View___Attribute_SectionTableBody( $this->aSectionset );
77 77
         
78 78
         $_aOutput       = array();
79
-        $_aOutput[]     = "<table " . $_oSectionTableAttributes->get() . ">"
79
+        $_aOutput[ ]     = "<table ".$_oSectionTableAttributes->get().">"
80 80
                 . $_oTableCaption->get()
81
-                . "<tbody " . $_oSectionTableBodyAttributes->get() . ">"
81
+                . "<tbody ".$_oSectionTableBodyAttributes->get().">"
82 82
                     . $this->_getSectionContent( $_iSectionIndex )
83 83
                 . "</tbody>"
84 84
             . "</table>";
85 85
 
86
-        $_oSectionTableContainerAttributes  = new AdminPageFramework_Form_View___Attribute_SectionTableContainer( $this->aSectionset );
87
-        return "<div " . $_oSectionTableContainerAttributes->get() . ">"
86
+        $_oSectionTableContainerAttributes = new AdminPageFramework_Form_View___Attribute_SectionTableContainer( $this->aSectionset );
87
+        return "<div ".$_oSectionTableContainerAttributes->get().">"
88 88
                 . implode( PHP_EOL, $_aOutput )
89 89
             . "</div>";    
90 90
         
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                 // Retrieve the formatted sectionsets of the content.
145 145
                 $_sSectionPath = $this->aSectionset[ '_section_path' ];
146 146
                 $_aSectionsets = $this->aStructure[ 'sectionsets' ];
147
-                if ( ! isset( $_aSectionsets[ $_sSectionPath ] ) ) {    // @todo    not sure what this check is for
147
+                if ( !isset( $_aSectionsets[ $_sSectionPath ] ) ) {    // @todo    not sure what this check is for
148 148
                     return '';
149 149
                 }          
150 150
                 
@@ -195,14 +195,14 @@  discard block
 block discarded – undo
195 195
                     $_aNestedSectionPaths = array();
196 196
                     
197 197
                     // List the section paths of the direct children
198
-                    foreach( $aNestedSctionsets as $_aNestedSectionset ) {
199
-                        $_sThisSectionPath = $sSubjectSectionPath . '|' . $_aNestedSectionset[ 'section_id' ];
198
+                    foreach ( $aNestedSctionsets as $_aNestedSectionset ) {
199
+                        $_sThisSectionPath = $sSubjectSectionPath.'|'.$_aNestedSectionset[ 'section_id' ];
200 200
                         $_aNestedSectionPaths[ $_sThisSectionPath ] = $_sThisSectionPath;
201 201
                     }                    
202 202
                     
203 203
                     // Now we need children's children.
204 204
                     $_aChildSectionPaths = array();
205
-                    foreach( $_aNestedSectionPaths as $_sNestedSectionPath ) {
205
+                    foreach ( $_aNestedSectionPaths as $_sNestedSectionPath ) {
206 206
                         $_aNestedSectionsets = $this->getElementAsArray( 
207 207
                             $aSectionsets, 
208 208
                             array( $_sNestedSectionPath, 'content' )
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,8 @@
 block discarded – undo
144 144
                 // Retrieve the formatted sectionsets of the content.
145 145
                 $_sSectionPath = $this->aSectionset[ '_section_path' ];
146 146
                 $_aSectionsets = $this->aStructure[ 'sectionsets' ];
147
-                if ( ! isset( $_aSectionsets[ $_sSectionPath ] ) ) {    // @todo    not sure what this check is for
147
+                if ( ! isset( $_aSectionsets[ $_sSectionPath ] ) ) {
148
+// @todo    not sure what this check is for
148 149
                     return '';
149 150
                 }          
150 151
                 
Please login to merge, or discard this patch.
form/_view/sectionset/AdminPageFramework_Form_View___SectionCaption.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
          */
80 80
         private function _getCaption( array $aSectionset, $iSectionIndex, $aFieldsets, $aFieldErrors, $aFieldTypeDefinitions, $aCallbacks, $oMsg ) {
81 81
             
82
-            if ( ! $aSectionset[ 'description' ] && ! $aSectionset[ 'title' ] ) {
82
+            if ( !$aSectionset[ 'description' ] && !$aSectionset[ 'title' ] ) {
83 83
                 return "<caption class='admin-page-framework-section-caption' style='display:none;'></caption>";
84 84
             }    
85 85
 
@@ -110,15 +110,15 @@  discard block
 block discarded – undo
110 110
                 $aCallbacks // field output element callables.                
111 111
             );            
112 112
             
113
-            $_bShowTitle    = empty( $_abCollapsible ) && ! $aSectionset[ 'section_tab_slug' ];
113
+            $_bShowTitle = empty( $_abCollapsible ) && !$aSectionset[ 'section_tab_slug' ];
114 114
             return 
115
-                "<caption " . $this->getAttributes( 
115
+                "<caption ".$this->getAttributes( 
116 116
                     array(
117 117
                         'class'             => 'admin-page-framework-section-caption',
118 118
                         // data-section_tab is referred by the repeater script to hide/show the title and the description
119 119
                         'data-section_tab'  => $aSectionset[ 'section_tab_slug' ],
120 120
                     ) 
121
-                ) . ">"
121
+                ).">"
122 122
                     . $_oCollapsibleSectionTitle->get()
123 123
                     . $this->getAOrB(
124 124
                         $_bShowTitle,
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
                     $this->oMsg,
180 180
                     $this->aCallbacks // field output element callables.
181 181
                 );
182
-                return "<div " . $this->getAttributes(
182
+                return "<div ".$this->getAttributes(
183 183
                         array(
184 184
                             'class' => 'admin-page-framework-section-title',
185 185
                             'style' => $this->getAOrB(
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                                 'display: none;'
189 189
                             ),
190 190
                         )
191
-                    ). ">" 
191
+                    ).">" 
192 192
                         . $_oSectionTitle->get()
193 193
                     . "</div>";                
194 194
             }
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
                 if ( $aSectionset[ 'collapsible' ] ) {
205 205
                     return '';
206 206
                 }
207
-                if ( ! is_callable( $hfSectionCallback ) ) {
207
+                if ( !is_callable( $hfSectionCallback ) ) {
208 208
                     return '';
209 209
                 }
210 210
                 
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
              */
237 237
             private function _shouldShowCaptionTitle( $aSectionset, $iSectionIndex ) {
238 238
                 
239
-                if ( ! $aSectionset[ 'title' ] ){
239
+                if ( !$aSectionset[ 'title' ] ) {
240 240
                     return false;
241 241
                 }
242 242
                 if ( $aSectionset[ 'collapsible' ] ) {
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -236,7 +236,7 @@
 block discarded – undo
236 236
              */
237 237
             private function _shouldShowCaptionTitle( $aSectionset, $iSectionIndex ) {
238 238
                 
239
-                if ( ! $aSectionset[ 'title' ] ){
239
+                if ( ! $aSectionset[ 'title' ] ) {
240 240
                     return false;
241 241
                 }
242 242
                 if ( $aSectionset[ 'collapsible' ] ) {
Please login to merge, or discard this patch.
form/_view/sectionset/AdminPageFramework_Form_View___SectionTitle.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
  */
19 19
 class AdminPageFramework_Form_View___SectionTitle extends AdminPageFramework_Form_View___Section_Base {            
20 20
   
21
-    public $aArguments      = array(
21
+    public $aArguments = array(
22 22
         'title'         => null,
23 23
         'tag'           => null,
24 24
         'section_index' => null,
25 25
     );
26
-    public $aFieldsets               = array();
26
+    public $aFieldsets = array();
27 27
     public $aSavedData              = array();
28 28
     public $aFieldErrors            = array();
29 29
     public $aFieldTypeDefinitions   = array();
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
          * @since       DEVVER      Moved from `AdminPageFramework_FormPart_SectionTitle`.
87 87
          * @return      string      The section title output. 
88 88
          */
89
-        protected function _getSectionTitle( $sTitle, $sTag, $aFieldsets, $iSectionIndex=null, $aFieldTypeDefinitions=array() ) {
89
+        protected function _getSectionTitle( $sTitle, $sTag, $aFieldsets, $iSectionIndex = null, $aFieldTypeDefinitions = array() ) {
90 90
        
91 91
             $_aSectionTitleField = $this->_getSectionTitleField( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions );
92 92
             return $_aSectionTitleField
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
              */
107 107
             private function _getSectionTitleField( array $aFieldsetsets, $iSectionIndex, $aFieldTypeDefinitions ) {   
108 108
             
109
-                foreach( $aFieldsetsets as $_aFieldsetset ) {
109
+                foreach ( $aFieldsetsets as $_aFieldsetset ) {
110 110
                     
111 111
                     if ( 'section_title' !== $_aFieldsetset[ 'type' ] ) {
112 112
                         continue;
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  * @since       DEVVER      Changed the name from `AdminPageFramework_FormPart_SectionTitle`.
17 17
  * @internal
18 18
  */
19
-class AdminPageFramework_Form_View___SectionTitle extends AdminPageFramework_Form_View___Section_Base {            
19
+class AdminPageFramework_Form_View___SectionTitle extends AdminPageFramework_Form_View___Section_Base {
20 20
   
21 21
     public $aArguments      = array(
22 22
         'title'         => null,
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
              * @since       3.6.0       Added the `$iSectionIndex` parameter. Added the `$aFieldTypeDefinitions` parameter.
105 105
              * @since       DEVVER      Moved from `AdminPageFramework_FormPart_SectionTitle`.
106 106
              */
107
-            private function _getSectionTitleField( array $aFieldsetsets, $iSectionIndex, $aFieldTypeDefinitions ) {   
107
+            private function _getSectionTitleField( array $aFieldsetsets, $iSectionIndex, $aFieldTypeDefinitions ) {
108 108
             
109 109
                 foreach( $aFieldsetsets as $_aFieldsetset ) {
110 110
                     
Please login to merge, or discard this patch.
form/_view/sectionset/AdminPageFramework_Form_View___Section_Base.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,13 +54,13 @@
 block discarded – undo
54 54
     public function getFieldsetOutput( $aFieldset ) {
55 55
 
56 56
         // Check if the field is visible
57
-        if ( ! $this->isFieldsetVisible( $aFieldset ) ) {          
57
+        if ( !$this->isFieldsetVisible( $aFieldset ) ) {          
58 58
             return '';
59 59
         }
60 60
 
61 61
         $_oFieldset = new AdminPageFramework_Form_View___Fieldset( 
62 62
             $aFieldset, 
63
-            $this->aSavedData,    // passed by reference. @todo: examine why it needs to be passed by reference.
63
+            $this->aSavedData, // passed by reference. @todo: examine why it needs to be passed by reference.
64 64
             $this->aFieldErrors, 
65 65
             $this->aFieldTypeDefinitions, 
66 66
             $this->oMsg,
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
     public function getFieldsetOutput( $aFieldset ) {
55 55
 
56 56
         // Check if the field is visible
57
-        if ( ! $this->isFieldsetVisible( $aFieldset ) ) {          
57
+        if ( ! $this->isFieldsetVisible( $aFieldset ) ) {
58 58
             return '';
59 59
         }
60 60
 
Please login to merge, or discard this patch.
form/_view/sectionset/AdminPageFramework_Form_View___Sectionsets.php 4 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -531,7 +531,7 @@
 block discarded – undo
531 531
                  * @return      string      The generated section tab list as HTML.
532 532
                  */
533 533
                 private function _getSectionTabList( $sSectionTabSlug, array $aSectionTabList ) {
534
-                   return $sSectionTabSlug 
534
+                    return $sSectionTabSlug 
535 535
                         ? "<ul class='admin-page-framework-section-tabs nav-tab-wrapper'>" 
536 536
                             . implode( PHP_EOL, $aSectionTabList ) 
537 537
                             . "</ul>"
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         private function _getSectionsetsTables( array $aSectionsets, array $aFieldsets, array $aCallbacks ) {
205 205
 
206 206
 
207
-            if ( empty( $aSectionsets ) ) { 
207
+            if ( empty( $aSectionsets ) ) {
208 208
                 return ''; 
209 209
             } 
210 210
             
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
              * Changed the visibility scope to private. Changed the 1st parameter from `$aSection`.
259 259
              * @return      array
260 260
              */
261
-            private function _getCollapsibleArgumentForSections( array $aSectionset=array() ) {  
261
+            private function _getCollapsibleArgumentForSections( array $aSectionset=array() ) {
262 262
                 
263 263
                 $_oArgumentFormater = new AdminPageFramework_Form_Model___Format_CollapsibleSection(
264 264
                     $aSectionset[ 'collapsible' ],
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
                     
364 364
                     // Get the section tables.
365 365
                     $_aSubSections = $this->numerizeElements( $_aSubSections ); // will include the main section as well.
366
-                    foreach( $_aSubSections as $_iIndex => $_aFields ) { 
366
+                    foreach( $_aSubSections as $_iIndex => $_aFields ) {
367 367
 
368 368
                         $_oEachSectionArguments = new AdminPageFramework_Form_Model___Format_EachSection(
369 369
                             $_aSection,
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
                  */
429 429
                 private function _getUnsetFlagSectionInputTag( array $aSection ) {
430 430
                     
431
-                    if ( false !== $aSection[ 'save' ] ) {                
431
+                    if ( false !== $aSection[ 'save' ] ) {
432 432
                         return '';
433 433
                     }
434 434
                     return $this->getHTMLTag( 
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -161,6 +161,7 @@  discard block
 block discarded – undo
161 161
     }
162 162
         /**
163 163
          * @since       DEVVER
164
+         * @param string $_sOutput
164 165
          * @return      string
165 166
          */
166 167
         private function _getSpinnerOutput( $_sOutput ) {
@@ -297,7 +298,7 @@  discard block
 block discarded – undo
297 298
              * @param       array       $_aOutputs      Holds output elements - contents, section tab list, count of subsections
298 299
              * @param       string      $_sSectionsID   The container id of secitons.
299 300
              * @param       array       $_aSection
300
-             * @param       array       $_aFieldsInSections     A fieldsets array already divided by section tab.
301
+             * @param       array       $aFieldsInSections     A fieldsets array already divided by section tab.
301 302
              * @return      array       The updated sections table output array.
302 303
              */
303 304
             private function _getSectionsetTable( $_aOutputs, $_sSectionsID, array $_aSection, array $aFieldsInSections ) {
@@ -351,6 +352,7 @@  discard block
 block discarded – undo
351 352
             }
352 353
                 /**
353 354
                  * @since       DEVVER
355
+                 * @param string $_sSectionsID
354 356
                  * @return      array
355 357
                  */
356 358
                 private function _getSubSections( $_aOutputs, $_sSectionsID, $_aSection, $_aSubSections ) {
@@ -499,6 +501,7 @@  discard block
 block discarded – undo
499 501
              * @since       3.5.3
500 502
              * @since       3.6.0       Removed the `$sSectionID` parameter. Added the `$aSectionset` parameter.
501 503
              * @since       DEVVER      Moved from `AdminPageFramework_FormPart_Table`.
504
+             * @param string $sSectionsID
502 505
              * @return      string      The formatted sections table HTML output.
503 506
              */
504 507
             private function _getFormattedSectionsTablesOutput( array $aOutputs, $aSectionset, $sSectionsID, array $aCollapsible, $sSectionTabSlug ) {
Please login to merge, or discard this patch.
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -126,16 +126,16 @@  discard block
 block discarded – undo
126 126
      */
127 127
     public function get() {
128 128
         
129
-        $_oFormatSectionsetsByTab  = new AdminPageFramework_Form_View___Format_SectionsetsByTab(
129
+        $_oFormatSectionsetsByTab = new AdminPageFramework_Form_View___Format_SectionsetsByTab(
130 130
             $this->aStructure[ 'sectionsets' ],
131 131
             $this->aStructure[ 'fieldsets' ],
132 132
             $this->aArguments[ 'nested_depth' ]
133 133
         );
134 134
 
135
-        $_aOutput     = array();
136
-        foreach( $_oFormatSectionsetsByTab->getTabs() as $_sSectionTabSlug ) {
135
+        $_aOutput = array();
136
+        foreach ( $_oFormatSectionsetsByTab->getTabs() as $_sSectionTabSlug ) {
137 137
 
138
-            $_aOutput[] = $this->_getFormOutput(
138
+            $_aOutput[ ] = $this->_getFormOutput(
139 139
                 $_oFormatSectionsetsByTab->getSectionsets( $_sSectionTabSlug ),
140 140
                 $_oFormatSectionsetsByTab->getFieldsets( $_sSectionTabSlug ),
141 141
                 $_sSectionTabSlug,
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
         // Generate id for this output
151 151
         $_sOutput = implode( PHP_EOL, $_aOutput );
152
-        $_sElementID = "admin-page-framework-sectionsets-" . uniqid();
152
+        $_sElementID = "admin-page-framework-sectionsets-".uniqid();
153 153
         return $this->_getSpinnerOutput( $_sOutput )
154 154
             .   "<div id='{$_sElementID}' class='admin-page-framework-sctionsets admin-page-framework-form-js-on'>"
155 155
                 . $_sOutput
@@ -184,17 +184,17 @@  discard block
 block discarded – undo
184 184
 
185 185
             // A sectionset is a set of sections.
186 186
             $_sSectionSet = $this->_getSectionsetsTables( 
187
-                $aSectionsets,  // sectionset definition (already devided by section tab)
188
-                $aFieldsets,    // fieldset definitions (already devided by section tab)
187
+                $aSectionsets, // sectionset definition (already devided by section tab)
188
+                $aFieldsets, // fieldset definitions (already devided by section tab)
189 189
                 $aCallbacks
190 190
             );
191 191
             return $_sSectionSet
192
-                ? "<div " . $this->getAttributes(
192
+                ? "<div ".$this->getAttributes(
193 193
                         array(
194 194
                             'class' => 'admin-page-framework-sectionset',
195
-                            'id'    => "sectionset-{$sSectionTabSlug}_" . md5( serialize( $aSectionsets ) ),
195
+                            'id'    => "sectionset-{$sSectionTabSlug}_".md5( serialize( $aSectionsets ) ),
196 196
                         ) 
197
-                    ) . ">"
197
+                    ).">"
198 198
                         . $_sSectionSet
199 199
                     . "</div>"
200 200
                 : '';
@@ -236,12 +236,12 @@  discard block
 block discarded – undo
236 236
                 'count_subsections' => 0,
237 237
             );
238 238
             $_sThisSectionID    = $_aFirstSectionset[ 'section_id' ];
239
-            $_sSectionsID       = 'sections-' . $_sThisSectionID;
239
+            $_sSectionsID       = 'sections-'.$_sThisSectionID;
240 240
             $_aCollapsible      = $this->_getCollapsibleArgumentForSections( 
241 241
                 $_aFirstSectionset 
242 242
             );
243 243
 
244
-            foreach( $aSectionsets as $_aSectionset ) {
244
+            foreach ( $aSectionsets as $_aSectionset ) {
245 245
            
246 246
                 $_sSectionTabSlug   = $_aSectionset[ 'section_tab_slug' ]; // needed outside the loop
247 247
                 $_aOutputs          = $this->_getSectionsetTable(
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
              * Changed the visibility scope to private. Changed the 1st parameter from `$aSection`.
274 274
              * @return      array
275 275
              */
276
-            private function _getCollapsibleArgumentForSections( array $aSectionset=array() ) {  
276
+            private function _getCollapsibleArgumentForSections( array $aSectionset = array() ) {  
277 277
                 
278 278
                 $_oArgumentFormater = new AdminPageFramework_Form_Model___Format_CollapsibleSection(
279 279
                     $aSectionset[ 'collapsible' ],
@@ -302,17 +302,17 @@  discard block
 block discarded – undo
302 302
              */
303 303
             private function _getSectionsetTable( $_aOutputs, $_sSectionsID, array $_aSection, array $aFieldsInSections ) {
304 304
             
305
-                if ( ! $this->isSectionsetVisible( $_aSection ) ) {
305
+                if ( !$this->isSectionsetVisible( $_aSection ) ) {
306 306
 // var_dump( 'not visible: ' . $_aSection[ '_section_path' ] );
307 307
                     return $_aOutputs;
308 308
                 }
309 309
 
310 310
                 // If the 'save' argument is false, insert a flag that disables saving the section inputs.
311
-                $_aOutputs[ 'section_contents' ][] = $this->_getUnsetFlagSectionInputTag( $_aSection );
311
+                $_aOutputs[ 'section_contents' ][ ] = $this->_getUnsetFlagSectionInputTag( $_aSection );
312 312
                 
313 313
                 // For repeatable sections - sub-sections are divided field definition arrays by sub-section index, 
314 314
                 // not section definition arrays.
315
-                $_aSubSections      = $this->getIntegerKeyElements( 
315
+                $_aSubSections = $this->getIntegerKeyElements( 
316 316
                     $this->getElementAsArray(
317 317
                         $aFieldsInSections, // subject
318 318
                         $_aSection[ '_section_path' ], // $_aSection[ 'section_id' ],   // dimensional key
@@ -356,29 +356,29 @@  discard block
 block discarded – undo
356 356
                 private function _getSubSections( $_aOutputs, $_sSectionsID, $_aSection, $_aSubSections ) {
357 357
                     
358 358
                     // Add the repeatable sections enabler script.
359
-                    if ( ! empty( $_aSection[ 'repeatable' ] ) ) {
360
-                        $_aOutputs[ 'section_contents' ][] = AdminPageFramework_Form_View___Script_RepeatableSection::getEnabler( 
359
+                    if ( !empty( $_aSection[ 'repeatable' ] ) ) {
360
+                        $_aOutputs[ 'section_contents' ][ ] = AdminPageFramework_Form_View___Script_RepeatableSection::getEnabler( 
361 361
                             $_sSectionsID, 
362 362
                             $_aOutputs[ 'count_subsections' ], 
363 363
                             $_aSection[ 'repeatable' ],
364 364
                             $this->oMsg
365 365
                         );
366
-                        $_aOutputs[ 'section_contents' ][] = $this->_getRepeatableSectionFlagTag( $_aSection );
366
+                        $_aOutputs[ 'section_contents' ][ ] = $this->_getRepeatableSectionFlagTag( $_aSection );
367 367
                     }
368 368
                     // Add the sortable sections enabler script. 3.6.0+
369
-                    if ( ! empty( $_aSection[ 'sortable' ] ) ) {
369
+                    if ( !empty( $_aSection[ 'sortable' ] ) ) {
370 370
 // @todo Change the name of the class to AdminPageFramework_Form_Script_...
371
-                        $_aOutputs[ 'section_contents' ][] = AdminPageFramework_Form_View___Script_SortableSection::getEnabler( 
371
+                        $_aOutputs[ 'section_contents' ][ ] = AdminPageFramework_Form_View___Script_SortableSection::getEnabler( 
372 372
                             $_sSectionsID, 
373 373
                             $_aSection[ 'sortable' ],
374 374
                             $this->oMsg
375 375
                         );
376
-                        $_aOutputs[ 'section_contents' ][] = $this->_getSortableSectionFlagTag( $_aSection );
376
+                        $_aOutputs[ 'section_contents' ][ ] = $this->_getSortableSectionFlagTag( $_aSection );
377 377
                     }
378 378
                     
379 379
                     // Get the section tables.
380 380
                     $_aSubSections = $this->numerizeElements( $_aSubSections ); // will include the main section as well.
381
-                    foreach( $_aSubSections as $_iIndex => $_aFields ) { 
381
+                    foreach ( $_aSubSections as $_iIndex => $_aFields ) { 
382 382
 
383 383
                         $_oEachSectionArguments = new AdminPageFramework_Form_Model___Format_EachSection(
384 384
                             $_aSection,
@@ -408,8 +408,8 @@  discard block
 block discarded – undo
408 408
                         array(
409 409
                             'class'                     => 'element-address',
410 410
                             'type'                      => 'hidden',
411
-                            'name'                      => '__repeatable_elements_' . $aSection[ '_structure_type' ] 
412
-                                . '[ ' . $aSection[ 'section_id' ] . ' ]',
411
+                            'name'                      => '__repeatable_elements_'.$aSection[ '_structure_type' ] 
412
+                                . '[ '.$aSection[ 'section_id' ].' ]',
413 413
                             // @todo examine whether this value should include a section index.
414 414
                             'value' => $aSection[ 'section_id' ],                            
415 415
                         )
@@ -427,8 +427,8 @@  discard block
 block discarded – undo
427 427
                         array(
428 428
                             'class'                     => 'element-address',
429 429
                             'type'                      => 'hidden',
430
-                            'name'                      => '__sortable_elements_' . $aSection[ '_structure_type' ] 
431
-                                . '[ ' . $aSection[ 'section_id' ] . ' ]',
430
+                            'name'                      => '__sortable_elements_'.$aSection[ '_structure_type' ] 
431
+                                . '[ '.$aSection[ 'section_id' ].' ]',
432 432
                             // @todo examine whether this value should include a section index.
433 433
                             'value' => $aSection[ 'section_id' ],                            
434 434
                         )
@@ -450,8 +450,8 @@  discard block
 block discarded – undo
450 450
                         'input',
451 451
                         array(
452 452
                             'type'  => 'hidden',
453
-                            'name'  => '__unset_' .  $aSection[ '_structure_type' ] . '[ ' . $aSection[ 'section_id' ] . ' ]',
454
-                            'value' => "__dummy_option_key|" . $aSection[ 'section_id' ],
453
+                            'name'  => '__unset_'.$aSection[ '_structure_type' ].'[ '.$aSection[ 'section_id' ].' ]',
454
+                            'value' => "__dummy_option_key|".$aSection[ 'section_id' ],
455 455
                             'class' => 'unset-element-names element-address',
456 456
                         )
457 457
                     );            
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
                 private function _getSectionTableWithTabList( array $_aOutputs, array $aSectionset, $aFieldsetsPerSection ) {
468 468
                                         
469 469
                     // Tab list
470
-                    $_aOutputs[ 'section_tab_list' ][] = $this->_getTabList( 
470
+                    $_aOutputs[ 'section_tab_list' ][ ] = $this->_getTabList( 
471 471
                         $aSectionset, 
472 472
                         $aFieldsetsPerSection, 
473 473
                         $this->aCallbacks[ 'fieldset_output' ]
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
 
477 477
                     // Section container
478 478
                     $_oSectionTable = new AdminPageFramework_Form_View___Section(
479
-                        $this->aArguments,  // for nested sections
479
+                        $this->aArguments, // for nested sections
480 480
                         $aSectionset,
481 481
                         $this->aStructure,
482 482
                         $aFieldsetsPerSection,
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
                         $this->aCallbacks,
487 487
                         $this->oMsg
488 488
                     );
489
-                    $_aOutputs[ 'section_contents' ][] = $_oSectionTable->get();                    
489
+                    $_aOutputs[ 'section_contents' ][ ] = $_oSectionTable->get();                    
490 490
                    
491 491
                     return $_aOutputs;
492 492
                  
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
                         'collapsible'       => $aCollapsible,
516 516
                         'container_type'    => 'sections', // section or sections                    
517 517
                     ),
518
-                    array(),            // fieldsets
518
+                    array(), // fieldsets
519 519
                     $this->aSavedData,   
520 520
                     $this->aFieldErrors, 
521 521
                     $this->aStructure[ 'field_type_definitions' ], 
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
                     $aOutputs[ 'count_subsections' ]
533 533
                 );
534 534
                 return $_oCollapsibleSectionTitle->get()
535
-                    . "<div " . $_oSectionsTablesContainerAttributes->get() . ">"
535
+                    . "<div ".$_oSectionsTablesContainerAttributes->get().">"
536 536
                         . $this->_getSectionTabList( $sSectionTabSlug, $aOutputs[ 'section_tab_list' ] )
537 537
                         . implode( PHP_EOL, $aOutputs[ 'section_contents' ] )
538 538
                     . "</div>";
@@ -563,21 +563,21 @@  discard block
 block discarded – undo
563 563
              */
564 564
             private function _getTabList( array $aSection, array $aFields, $hfFieldCallback ) {
565 565
                                 
566
-                if ( ! $aSection[ 'section_tab_slug' ] ) {
566
+                if ( !$aSection[ 'section_tab_slug' ] ) {
567 567
                     return '';
568 568
                 }
569 569
                 
570 570
                 $iSectionIndex      = $aSection[ '_index' ];
571 571
 
572
-                $_sSectionTagID     = 'section-' . $aSection[ 'section_id' ] . '__' . $iSectionIndex;
572
+                $_sSectionTagID     = 'section-'.$aSection[ 'section_id' ].'__'.$iSectionIndex;
573 573
                 $_aTabAttributes    = $aSection[ 'attributes' ][ 'tab' ]
574 574
                     + array(
575 575
                         'class' => 'admin-page-framework-section-tab nav-tab',
576 576
                         'id'    => "section_tab-{$_sSectionTagID}",
577 577
                         'style' => null
578 578
                     );
579
-                $_aTabAttributes[ 'class' ] = $this->getClassAttribute( $_aTabAttributes[ 'class' ], $aSection[ 'class' ][ 'tab' ] );  // 3.3.1+
580
-                $_aTabAttributes[ 'style' ] = $this->getStyleAttribute( $_aTabAttributes[ 'style' ], $aSection[ 'hidden' ] ? 'display:none' : null );  // 3.3.1+
579
+                $_aTabAttributes[ 'class' ] = $this->getClassAttribute( $_aTabAttributes[ 'class' ], $aSection[ 'class' ][ 'tab' ] ); // 3.3.1+
580
+                $_aTabAttributes[ 'style' ] = $this->getStyleAttribute( $_aTabAttributes[ 'style' ], $aSection[ 'hidden' ] ? 'display:none' : null ); // 3.3.1+
581 581
                 
582 582
                 $_oSectionTitle = new AdminPageFramework_Form_View___SectionTitle(                    
583 583
                     array(
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
                     $this->aCallbacks // field output element callables.                    
594 594
                 );                        
595 595
                 
596
-                return "<li " . $this->getAttributes( $_aTabAttributes ) . ">"
596
+                return "<li ".$this->getAttributes( $_aTabAttributes ).">"
597 597
                     . "<a href='#{$_sSectionTagID}'>"
598 598
                         . $_oSectionTitle->get()
599 599
                     ."</a>"
Please login to merge, or discard this patch.
format/AdminPageFramework_Form_View___Format_SectionsetsByTab.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      * 
25 25
      * Only one depth at a time will be parsed.
26 26
      */
27
-    public $iNestedDepth  = 0;
27
+    public $iNestedDepth = 0;
28 28
     
29 29
     /**
30 30
      * Stores the generated section tab slugs.
@@ -120,11 +120,11 @@  discard block
 block discarded – undo
120 120
             $_aFieldsBySectionTab   = array();
121 121
             $_iIndex                = 0;
122 122
 
123
-            foreach( $aSectionsets as $_sSectionPath => $_aSectionset ) {
123
+            foreach ( $aSectionsets as $_sSectionPath => $_aSectionset ) {
124 124
 
125 125
                 // If no fields for the section, no need to add the section 
126 126
                 // unless the custom sectionset output is defined.
127
-                if ( ! isset( $aFieldsets[ $_sSectionPath ] ) && ! $this->_isCustomContentSet( $_aSectionset ) ) {
127
+                if ( !isset( $aFieldsets[ $_sSectionPath ] ) && !$this->_isCustomContentSet( $_aSectionset ) ) {
128 128
                     continue;
129 129
                 }
130 130
                        
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
                 $_sSectionTaqbSlug = $this->getAOrB(
137 137
                     $_aSectionset[ 'section_tab_slug' ],
138 138
                     $_aSectionset[ 'section_tab_slug' ],
139
-                    '_default_' . $this->iNestedDepth . '_' . ( ++$_iIndex )
139
+                    '_default_'.$this->iNestedDepth.'_'.( ++$_iIndex )
140 140
                 );
141 141
                 $_aSectionsBySectionTab[ $_sSectionTaqbSlug ][ $_sSectionPath ] = $_aSectionset;
142 142
                 $_aFieldsBySectionTab[ $_sSectionTaqbSlug ][ $_sSectionPath ]   = $this->getElement(
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
              * @since       DEVVER      Moved from `AdminPageFramework_FormPart_Table`.
158 158
              * @return      boolean     True if a custom content value is set.
159 159
              */
160
-            private function _isCustomContentSet( array $aSectionset, array $aKeys=array( 'content' ) ) {
160
+            private function _isCustomContentSet( array $aSectionset, array $aKeys = array( 'content' ) ) {
161 161
                 return isset( $aSectionset[ 'content' ] );
162 162
                 // @deprecated
163 163
                 // foreach( $aKeys as $_sKey ) {
Please login to merge, or discard this patch.