Completed
Branch master (bf4987)
by Michael
03:55
created
factory/_common/form/field_type/AdminPageFramework_FieldType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
      * </code>
72 72
      * @access       public      This must be public as accessed from outside.
73 73
      */    
74
-    public $aFieldTypeSlugs = array( 'default', );
74
+    public $aFieldTypeSlugs = array( 'default',);
75 75
     
76 76
     /**
77 77
      * Defines the default key-values of this field type. 
Please login to merge, or discard this patch.
factory/_common/form/field_type/AdminPageFramework_FieldType_select.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
     protected function getField( $aField ) {
73 73
             
74 74
         $_oSelectInput = new AdminPageFramework_Input_select( $aField[ 'attributes' ] );
75
-        if ( $aField[ 'is_multiple' ]  ) {            
75
+        if ( $aField[ 'is_multiple' ]  ) {
76 76
             $_oSelectInput->setAttribute( array( 'select', 'multiple' ), 'multiple' );
77 77
         }
78 78
         return
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     /**
104 104
      * Defines the field type slugs used for this field type.
105 105
      */
106
-    public $aFieldTypeSlugs = array( 'select', );
106
+    public $aFieldTypeSlugs = array( 'select',);
107 107
     
108 108
     /**
109 109
      * Defines the default key-values of this field type. 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             'select'    => array(
116 116
                 'size'          => 1,
117 117
                 'autofocusNew'  => null,
118
-                'multiple'      => null,    // set 'multiple' for multiple selections. If 'is_multiple' is set, it takes the precedence.
118
+                'multiple'      => null, // set 'multiple' for multiple selections. If 'is_multiple' is set, it takes the precedence.
119 119
                 'required'      => null,     
120 120
             ),
121 121
             'optgroup'  => array(),
@@ -155,12 +155,12 @@  discard block
 block discarded – undo
155 155
     protected function getField( $aField ) {
156 156
             
157 157
         $_oSelectInput = new AdminPageFramework_Input_select( $aField[ 'attributes' ] );
158
-        if ( $aField[ 'is_multiple' ]  ) {            
158
+        if ( $aField[ 'is_multiple' ] ) {            
159 159
             $_oSelectInput->setAttribute( array( 'select', 'multiple' ), 'multiple' );
160 160
         }
161 161
         return
162 162
             $aField[ 'before_label' ]
163
-            . "<div " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-container admin-page-framework-select-label' ) . ">" 
163
+            . "<div ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-container admin-page-framework-select-label' ).">" 
164 164
                 . "<label for='{$aField[ 'input_id' ]}'>"
165 165
                     . $aField[ 'before_input' ]
166 166
                     . $_oSelectInput->get( $aField[ 'label' ] )
Please login to merge, or discard this patch.
factory/_common/form/field_type/AdminPageFramework_FieldType_import.php 2 patches
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     /**
21 21
      * Defines the field type slugs used for this field type.
22 22
      */
23
-    public $aFieldTypeSlugs = array( 'import', );
23
+    public $aFieldTypeSlugs = array( 'import',);
24 24
     
25 25
     /**
26 26
      * Defines the default key-values of this field type. 
@@ -91,9 +91,9 @@  discard block
 block discarded – undo
91 91
     protected function getField( $aField ) {
92 92
         
93 93
         /* Set some required values */
94
-        $aField['attributes']['name']   = "__import[submit][{$aField['input_id']}]";
95
-        $aField['label']                = $aField['label'] 
96
-            ? $aField['label'] 
94
+        $aField[ 'attributes' ][ 'name' ]   = "__import[submit][{$aField[ 'input_id' ]}]";
95
+        $aField[ 'label' ]                = $aField[ 'label' ] 
96
+            ? $aField[ 'label' ] 
97 97
             : $this->oMsg->get( 'import' );
98 98
         return parent::getField( $aField );     
99 99
     }    
@@ -106,13 +106,13 @@  discard block
 block discarded – undo
106 106
      * @since 3.0.0
107 107
      */    
108 108
     protected function _getExtraFieldsBeforeLabel( &$aField ) {
109
-        return "<input " . $this->getAttributes( 
109
+        return "<input ".$this->getAttributes( 
110 110
                 array(
111
-                    'id' => "{$aField['input_id']}_file",
111
+                    'id' => "{$aField[ 'input_id' ]}_file",
112 112
                     'type' => 'file',
113
-                    'name' => "__import[{$aField['input_id']}]",
114
-                ) + $aField['attributes']['file']     
115
-            ) . " />";
113
+                    'name' => "__import[{$aField[ 'input_id' ]}]",
114
+                ) + $aField[ 'attributes' ][ 'file' ]     
115
+            )." />";
116 116
     }    
117 117
     
118 118
     /**
@@ -121,44 +121,44 @@  discard block
 block discarded – undo
121 121
      */
122 122
     protected function _getExtraInputFields( &$aField ) {
123 123
 
124
-        $aHiddenAttributes = array( 'type' => 'hidden', );     
124
+        $aHiddenAttributes = array( 'type' => 'hidden',);     
125 125
         return    
126
-            "<input " . $this->getAttributes( 
126
+            "<input ".$this->getAttributes( 
127 127
                 array(
128
-                    'name' => "__import[{$aField['input_id']}][input_id]",
129
-                    'value' => $aField['input_id'],
128
+                    'name' => "__import[{$aField[ 'input_id' ]}][input_id]",
129
+                    'value' => $aField[ 'input_id' ],
130 130
                 ) + $aHiddenAttributes
131
-            ) . "/>"
132
-            . "<input " . $this->getAttributes( 
131
+            )."/>"
132
+            . "<input ".$this->getAttributes( 
133 133
                 array(
134
-                    'name' => "__import[{$aField['input_id']}][field_id]",
135
-                    'value' => $aField['field_id'],
134
+                    'name' => "__import[{$aField[ 'input_id' ]}][field_id]",
135
+                    'value' => $aField[ 'field_id' ],
136 136
                 ) + $aHiddenAttributes
137
-            ) . "/>"
138
-            . "<input " . $this->getAttributes( 
137
+            )."/>"
138
+            . "<input ".$this->getAttributes( 
139 139
                 array(
140
-                    'name' => "__import[{$aField['input_id']}][section_id]",
141
-                    'value' => isset( $aField['section_id'] ) && $aField['section_id'] != '_default' ? $aField['section_id'] : '',
140
+                    'name' => "__import[{$aField[ 'input_id' ]}][section_id]",
141
+                    'value' => isset( $aField[ 'section_id' ] ) && $aField[ 'section_id' ] != '_default' ? $aField[ 'section_id' ] : '',
142 142
                 ) + $aHiddenAttributes
143
-            ) . "/>"     
144
-            . "<input " . $this->getAttributes( 
143
+            )."/>"     
144
+            . "<input ".$this->getAttributes( 
145 145
                 array(
146
-                    'name' => "__import[{$aField['input_id']}][is_merge]",
147
-                    'value' => $aField['is_merge'],
146
+                    'name' => "__import[{$aField[ 'input_id' ]}][is_merge]",
147
+                    'value' => $aField[ 'is_merge' ],
148 148
                 ) + $aHiddenAttributes
149
-            ) . "/>"    
150
-            . "<input " . $this->getAttributes( 
149
+            )."/>"    
150
+            . "<input ".$this->getAttributes( 
151 151
                 array(
152
-                    'name' => "__import[{$aField['input_id']}][option_key]",
153
-                    'value' => $aField['option_key'],
152
+                    'name' => "__import[{$aField[ 'input_id' ]}][option_key]",
153
+                    'value' => $aField[ 'option_key' ],
154 154
                 ) + $aHiddenAttributes
155
-            ) . "/>"
156
-            . "<input " . $this->getAttributes( 
155
+            )."/>"
156
+            . "<input ".$this->getAttributes( 
157 157
                 array(
158
-                    'name' => "__import[{$aField['input_id']}][format]",
159
-                    'value' => $aField['format'],
158
+                    'name' => "__import[{$aField[ 'input_id' ]}][format]",
159
+                    'value' => $aField[ 'format' ],
160 160
                 ) + $aHiddenAttributes
161
-            ) . "/>"
161
+            )."/>"
162 162
             ;
163 163
     }
164 164
         
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
      * @since       2.1.5
44 44
      * @since       3.3.1       Changed from `_replyToGetStyles()`.
45 45
      */        
46
-    protected function getStyles() { 
46
+    protected function getStyles() {
47 47
         return <<<CSSRULES
48 48
 /* Text Field Type */
49 49
 .admin-page-framework-field.admin-page-framework-field-text > .admin-page-framework-input-label-container {
Please login to merge, or discard this patch.
factory/_common/form/field_type/AdminPageFramework_FieldType_export.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     /**
21 21
      * Defines the field type slugs used for this field type.
22 22
      */
23
-    public $aFieldTypeSlugs = array( 'export', );
23
+    public $aFieldTypeSlugs = array( 'export',);
24 24
     
25 25
     /**
26 26
      * Defines the default key-values of this field type. 
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
      * @remark $_aDefaultKeys holds shared default key-values defined in the base class.
29 29
      */
30 30
     protected $aDefaultKeys = array(
31
-        'data'          => null,        // ( array|string|object ) This is for the export field type. Do not set a value here.     
32
-        'format'        => 'json',      // ( string ) for the export field type. Do not set a default value here. Currently array, json, and text are supported.
33
-        'file_name'     => null,        // ( string ) for the export field type. Do not set a default value here.    
31
+        'data'          => null, // ( array|string|object ) This is for the export field type. Do not set a value here.     
32
+        'format'        => 'json', // ( string ) for the export field type. Do not set a default value here. Currently array, json, and text are supported.
33
+        'file_name'     => null, // ( string ) for the export field type. Do not set a default value here.    
34 34
         'attributes'    => array(
35 35
             'class' => 'button button-primary',
36 36
         ),    
@@ -71,14 +71,14 @@  discard block
 block discarded – undo
71 71
     protected function getField( $aField ) {
72 72
             
73 73
         /* Set the transient data to export - If the value is not an array and the export data is set. */
74
-        if ( isset( $aField['data'] ) ) {
75
-            $this->setTransient( md5( "{$aField['class_name']}_{$aField['input_id']}" ), $aField['data'], 60*2 ); // 2 minutes.
74
+        if ( isset( $aField[ 'data' ] ) ) {
75
+            $this->setTransient( md5( "{$aField[ 'class_name' ]}_{$aField[ 'input_id' ]}" ), $aField[ 'data' ], 60 * 2 ); // 2 minutes.
76 76
         } 
77 77
         
78 78
         /* Set some required values */
79
-        $aField['attributes']['name']   = "__export[submit][{$aField['input_id']}]";
80
-        $aField['file_name']            = $aField['file_name'] ? $aField['file_name'] : $this->_generateExportFileName( $aField['option_key'] ? $aField['option_key'] : $aField['class_name'], $aField['format'] );
81
-        $aField['label']                = $aField['label'] ? $aField['label'] : $this->oMsg->get( 'export' );
79
+        $aField[ 'attributes' ][ 'name' ]   = "__export[submit][{$aField[ 'input_id' ]}]";
80
+        $aField[ 'file_name' ]            = $aField[ 'file_name' ] ? $aField[ 'file_name' ] : $this->_generateExportFileName( $aField[ 'option_key' ] ? $aField[ 'option_key' ] : $aField[ 'class_name' ], $aField[ 'format' ] );
81
+        $aField[ 'label' ]                = $aField[ 'label' ] ? $aField[ 'label' ] : $this->oMsg->get( 'export' );
82 82
         
83 83
         return parent::getField( $aField );
84 84
         
@@ -93,42 +93,42 @@  discard block
 block discarded – undo
93 93
 
94 94
         $_aAttributes = array( 'type' => 'hidden' );
95 95
         return
96
-            "<input " . $this->getAttributes( 
96
+            "<input ".$this->getAttributes( 
97 97
                 array(
98
-                    'name' => "__export[{$aField['input_id']}][input_id]",
99
-                    'value' => $aField['input_id'],
98
+                    'name' => "__export[{$aField[ 'input_id' ]}][input_id]",
99
+                    'value' => $aField[ 'input_id' ],
100 100
                 ) + $_aAttributes
101
-            ) . "/>"
102
-            . "<input " . $this->getAttributes( 
101
+            )."/>"
102
+            . "<input ".$this->getAttributes( 
103 103
                 array(
104
-                    'name' => "__export[{$aField['input_id']}][field_id]",
105
-                    'value' => $aField['field_id'],
104
+                    'name' => "__export[{$aField[ 'input_id' ]}][field_id]",
105
+                    'value' => $aField[ 'field_id' ],
106 106
                 ) + $_aAttributes
107
-            ) . "/>"
108
-            . "<input " . $this->getAttributes( 
107
+            )."/>"
108
+            . "<input ".$this->getAttributes( 
109 109
                 array(
110
-                    'name' => "__export[{$aField['input_id']}][section_id]",
111
-                    'value' => isset( $aField['section_id'] ) && $aField['section_id'] != '_default' ? $aField['section_id'] : '',
110
+                    'name' => "__export[{$aField[ 'input_id' ]}][section_id]",
111
+                    'value' => isset( $aField[ 'section_id' ] ) && $aField[ 'section_id' ] != '_default' ? $aField[ 'section_id' ] : '',
112 112
                 ) + $_aAttributes
113
-            ) . "/>"
114
-            . "<input " . $this->getAttributes( 
113
+            )."/>"
114
+            . "<input ".$this->getAttributes( 
115 115
                 array(
116
-                    'name' => "__export[{$aField['input_id']}][file_name]",
117
-                    'value' => $aField['file_name'],
116
+                    'name' => "__export[{$aField[ 'input_id' ]}][file_name]",
117
+                    'value' => $aField[ 'file_name' ],
118 118
                 ) + $_aAttributes
119
-            ) . "/>"
120
-            . "<input " . $this->getAttributes( 
119
+            )."/>"
120
+            . "<input ".$this->getAttributes( 
121 121
                 array(
122
-                    'name' => "__export[{$aField['input_id']}][format]",
123
-                    'value' => $aField['format'],
122
+                    'name' => "__export[{$aField[ 'input_id' ]}][format]",
123
+                    'value' => $aField[ 'format' ],
124 124
                 ) + $_aAttributes
125
-            ) . "/>"
126
-            . "<input " . $this->getAttributes( 
125
+            )."/>"
126
+            . "<input ".$this->getAttributes( 
127 127
                 array(
128
-                    'name' => "__export[{$aField['input_id']}][transient]",
129
-                    'value' => isset( $aField['data'] ),
128
+                    'name' => "__export[{$aField[ 'input_id' ]}][transient]",
129
+                    'value' => isset( $aField[ 'data' ] ),
130 130
                 ) + $_aAttributes
131
-            ) . "/>"
131
+            )."/>"
132 132
             ;
133 133
     }
134 134
             
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
          * @since 2.0.0
142 142
          * @since 2.1.5 Moved from the AdminPageFramework_FormField class.
143 143
          */ 
144
-        private function _generateExportFileName( $sOptionKey, $sExportFormat='json' ) {
144
+        private function _generateExportFileName( $sOptionKey, $sExportFormat = 'json' ) {
145 145
                 
146 146
             switch ( trim( strtolower( $sExportFormat ) ) ) {
147 147
                 case 'text': // for plain text.
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
                     break;
157 157
             }     
158 158
                 
159
-            return $sOptionKey . '_' . date("Ymd") . '.' . $sExt;
159
+            return $sOptionKey.'_'.date( "Ymd" ).'.'.$sExt;
160 160
             
161 161
         }
162 162
 
Please login to merge, or discard this patch.
factory/_common/form/_view/AdminPageFramework_Form_View___ToolTip.php 3 patches
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
  * @since       DEVVER
16 16
  * @internal
17 17
  */
18
-class AdminPageFramework_Form_View___ToolTip extends AdminPageFramework_Form_View___Section_Base {            
18
+class AdminPageFramework_Form_View___ToolTip extends AdminPageFramework_Form_View___Section_Base {
19 19
   
20 20
     public $aArguments      = array(
21 21
         'attributes'    => array(), // attributes
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
          * @since       DEVVER
100 100
          * @return      string
101 101
          */
102
-        private function _getDescriptions() {         
102
+        private function _getDescriptions() {
103 103
 
104 104
             if ( isset( $this->aArguments[ 'content' ] ) ) {
105 105
                 return  "<span class='admin-page-framework-form-tool-tip-description'>"
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,6 @@  discard block
 block discarded – undo
42 42
      * Sets up properties.
43 43
      * @since       3.6.0
44 44
      * @since       3.7.0           Changed the parameter structure.
45
-     * @param       array|string    $asArguments        The content output or the tooltip argument array.
46
-     * @param       string          $sTitleElementID    Not used at the moment.
47 45
      */
48 46
     public function __construct( /* $aArguments, $sTitleElementID */ ) {
49 47
 
@@ -170,6 +168,7 @@  discard block
 block discarded – undo
170 168
 
171 169
     /**
172 170
      * Generates HTML attributes of the specified element.
171
+     * @param string $sElementKey
173 172
      * @return      string
174 173
      * @since       3.8.5
175 174
      */
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     /**
22 22
      * Stores the default argument values.
23 23
      */
24
-    public $aArguments      = array(
24
+    public $aArguments = array(
25 25
         'attributes'    => array(
26 26
             'container'   => array(),   
27 27
             'title'       => array(),
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
             'description' => array(),
30 30
             'icon'        => array(),
31 31
         ), 
32
-        'icon'          => null,    // the icon output to override
33
-        'dash-icon'     => 'dashicons-editor-help',   // the dash-icon class selector for the icon
34
-        'icon_alt_text' => '[?]',   // [3.8.5+] alternative text when icon is not available. For WP v3.7.x or below.
32
+        'icon'          => null, // the icon output to override
33
+        'dash-icon'     => 'dashicons-editor-help', // the dash-icon class selector for the icon
34
+        'icon_alt_text' => '[?]', // [3.8.5+] alternative text when icon is not available. For WP v3.7.x or below.
35 35
         'title'         => null,  
36
-        'content'       => null,    // will be assigned in the constructor
36
+        'content'       => null, // will be assigned in the constructor
37 37
     );
38 38
     
39 39
     public $sTitleElementID;
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                 if ( is_string( $asContent ) ) {
91 91
                     return true;
92 92
                 }
93
-                if ( is_array( $asContent ) && ! $this->isAssociative( $asContent ) ) {
93
+                if ( is_array( $asContent ) && !$this->isAssociative( $asContent ) ) {
94 94
                     return true;
95 95
                 }
96 96
                 return false;
@@ -104,12 +104,12 @@  discard block
 block discarded – undo
104 104
      * @return      string      The output.
105 105
      */
106 106
     public function get() {
107
-        if ( ! $this->aArguments[ 'content' ] ) {
107
+        if ( !$this->aArguments[ 'content' ] ) {
108 108
             return '';
109 109
         }
110
-        return "<a " . $this->_getElementAttributes( 'container', 'admin-page-framework-form-tooltip' ) . ">"
110
+        return "<a ".$this->_getElementAttributes( 'container', 'admin-page-framework-form-tooltip' ).">"
111 111
                 . $this->_getTipLinkIcon()
112
-                . "<span " . $this->_getElementAttributes( 'content', 'admin-page-framework-form-tooltip-content' ) . ">"
112
+                . "<span ".$this->_getElementAttributes( 'content', 'admin-page-framework-form-tooltip-content' ).">"
113 113
                     . $this->_getTipTitle()
114 114
                     . $this->_getDescriptions()
115 115
                 . "</span>"
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                 return $this->aArguments[ 'icon' ];
128 128
             }
129 129
             if ( version_compare( $GLOBALS[ 'wp_version' ], '3.8', '>=' ) ) {
130
-                return "<span " . $this->_getElementAttributes( 
130
+                return "<span ".$this->_getElementAttributes( 
131 131
                         'icon', 
132 132
                         array(
133 133
                             'dashicons', 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
          */
146 146
         private function _getTipTitle() {
147 147
             if ( isset( $this->aArguments[ 'title' ] ) ) {
148
-                return "<span " . $this->_getElementAttributes( 'title', 'admin-page-framework-form-tooltip-title' ) . ">"
148
+                return "<span ".$this->_getElementAttributes( 'title', 'admin-page-framework-form-tooltip-title' ).">"
149 149
                     . $this->aArguments[ 'title' ]
150 150
                     . "</span>";
151 151
             }
@@ -157,9 +157,9 @@  discard block
 block discarded – undo
157 157
          */
158 158
         private function _getDescriptions() {         
159 159
             if ( isset( $this->aArguments[ 'content' ] ) ) {
160
-                return "<span " . $this->_getElementAttributes( 'description', 'admin-page-framework-form-tooltip-description' ) . ">"
160
+                return "<span ".$this->_getElementAttributes( 'description', 'admin-page-framework-form-tooltip-description' ).">"
161 161
                         . implode( 
162
-                            "</span><span " . $this->_getElementAttributes( 'description', 'admin-page-framework-form-tooltip-description' ) . ">", 
162
+                            "</span><span ".$this->_getElementAttributes( 'description', 'admin-page-framework-form-tooltip-description' ).">", 
163 163
                             $this->getAsArray( $this->aArguments[ 'content' ] )
164 164
                         )
165 165
                     . "</span>"
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         $_aContainerAttributes = $this->getElementAsArray(
179 179
             $this->aArguments,
180 180
             array( 'attributes', $sElementKey )
181
-        ) + array( 'class' => '' ) ;
181
+        ) + array( 'class' => '' );
182 182
         $_aContainerAttributes[ 'class' ] = $this->getClassAttribute( 
183 183
             $_aContainerAttributes[ 'class' ], 
184 184
             $asClassSelectors 
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.
_view/sectionset/AdminPageFramework_Form_View___CollapsibleSectionTitle.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,17 +18,17 @@  discard block
 block discarded – undo
18 18
  */
19 19
 class AdminPageFramework_Form_View___CollapsibleSectionTitle extends AdminPageFramework_Form_View___SectionTitle {
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
         'collapsible'       => array(),
26 26
         'container_type'    => 'section', // section or sections
27 27
         
28
-        'sectionset'        => array(),  // 3.7.0+ sectionset definition array
28
+        'sectionset'        => array(), // 3.7.0+ sectionset definition array
29 29
         
30 30
     );
31
-    public $aFieldsets               = array();
31
+    public $aFieldsets = array();
32 32
     public $aSavedData              = array();
33 33
     public $aFieldErrors            = array();
34 34
     public $aFieldTypeDefinitions   = array();
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
          * @param       array|boolean   $aCollapsible       The collapsible argument.
63 63
          * @param       string          $sContainer          The position context. Accepts either 'sections' or 'section'. If the set position in the argument array does not match this value, the method will return an empty string.
64 64
          */
65
-        private function _getCollapsibleSectionTitleBlock( array $aCollapsible, $sContainer='sections', $iSectionIndex=null ) {
65
+        private function _getCollapsibleSectionTitleBlock( array $aCollapsible, $sContainer = 'sections', $iSectionIndex = null ) {
66 66
 
67 67
             if ( $sContainer !== $aCollapsible[ 'container' ] ) { 
68 68
                 return ''; 
@@ -78,10 +78,10 @@  discard block
 block discarded – undo
78 78
             );
79 79
             
80 80
             $_aSectionset        = $this->aArguments[ 'sectionset' ];
81
-            $_sSectionTitleTagID = str_replace( '|', '_', $_aSectionset[ '_section_path' ]  ) . '_' . $iSectionIndex;
81
+            $_sSectionTitleTagID = str_replace( '|', '_', $_aSectionset[ '_section_path' ] ).'_'.$iSectionIndex;
82 82
             
83 83
             return $this->_getCollapsibleSectionsEnablerScript()
84
-                . "<div " . $this->getAttributes(
84
+                . "<div ".$this->getAttributes(
85 85
                     array(
86 86
                         'id'    => $_sSectionTitleTagID,
87 87
                         'class' => $this->getClassAttribute(
@@ -102,11 +102,11 @@  discard block
 block discarded – undo
102 102
                                 'collapsed',
103 103
                                 ''
104 104
                             ),                            
105
-                            'admin-page-framework-collapsible-type-' . $aCollapsible[ 'type' ]
105
+                            'admin-page-framework-collapsible-type-'.$aCollapsible[ 'type' ]
106 106
                         ),
107 107
                     ) 
108 108
                     + $this->getDataAttributeArray( $aCollapsible )
109
-                ) . ">"  
109
+                ).">"  
110 110
                         . $_sSectionTitle
111 111
                     . "</div>";
112 112
             
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
         private function _getCollapsibleSectionTitleBlock( array $aCollapsible, $sContainer='sections', $iSectionIndex=null ) {
63 63
 
64
-            if ( $sContainer !== $aCollapsible[ 'container' ] ) { 
64
+            if ( $sContainer !== $aCollapsible[ 'container' ] ) {
65 65
                 return ''; 
66 66
             }
67 67
               
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.
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -127,16 +127,16 @@  discard block
 block discarded – undo
127 127
      */
128 128
     public function get() {
129 129
         
130
-        $_oFormatSectionsetsByTab  = new AdminPageFramework_Form_View___Format_SectionsetsByTab(
130
+        $_oFormatSectionsetsByTab = new AdminPageFramework_Form_View___Format_SectionsetsByTab(
131 131
             $this->aStructure[ 'sectionsets' ],
132 132
             $this->aStructure[ 'fieldsets' ],
133 133
             $this->aArguments[ 'nested_depth' ]
134 134
         );
135 135
 
136
-        $_aOutput     = array();
137
-        foreach( $_oFormatSectionsetsByTab->getTabs() as $_sSectionTabSlug ) {
136
+        $_aOutput = array();
137
+        foreach ( $_oFormatSectionsetsByTab->getTabs() as $_sSectionTabSlug ) {
138 138
 
139
-            $_aOutput[] = $this->_getFormOutput(
139
+            $_aOutput[ ] = $this->_getFormOutput(
140 140
                 $_oFormatSectionsetsByTab->getSectionsets( $_sSectionTabSlug ),
141 141
                 $_oFormatSectionsetsByTab->getFieldsets( $_sSectionTabSlug ),
142 142
                 $_sSectionTabSlug,
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 
151 151
         // Generate id for this output
152 152
         $_sOutput = implode( PHP_EOL, $_aOutput );
153
-        $_sElementID = "admin-page-framework-sectionsets-" . uniqid();
153
+        $_sElementID = "admin-page-framework-sectionsets-".uniqid();
154 154
         return $this->_getSpinnerOutput( $_sOutput )
155 155
             .   "<div id='{$_sElementID}' class='admin-page-framework-sctionsets admin-page-framework-form-js-on'>"
156 156
                 . $_sOutput
@@ -185,17 +185,17 @@  discard block
 block discarded – undo
185 185
 
186 186
             // A sectionset is a set of sections.
187 187
             $_sSectionSet = $this->_getSectionsetsTables( 
188
-                $aSectionsets,  // section-set definition (already divided by section tab)
189
-                $aFieldsets,    // field-set definitions (already divided by section tab)
188
+                $aSectionsets, // section-set definition (already divided by section tab)
189
+                $aFieldsets, // field-set definitions (already divided by section tab)
190 190
                 $aCallbacks
191 191
             );
192 192
             return $_sSectionSet
193
-                ? "<div " . $this->getAttributes(
193
+                ? "<div ".$this->getAttributes(
194 194
                         array(
195 195
                             'class' => 'admin-page-framework-sectionset',
196
-                            'id'    => "sectionset-{$sSectionTabSlug}_" . md5( serialize( $aSectionsets ) ),
196
+                            'id'    => "sectionset-{$sSectionTabSlug}_".md5( serialize( $aSectionsets ) ),
197 197
                         ) 
198
-                    ) . ">"
198
+                    ).">"
199 199
                         . $_sSectionSet
200 200
                     . "</div>"
201 201
                 : '';
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
              * If there is no field overall to the section and its section tab, return an empty string.
228 228
              * Otherwise, the sectionsets container gets rendered and its CSS rules such as margins give unwanted results.
229 229
              */
230
-            if ( ! count( $aFieldsets ) ) {
230
+            if ( !count( $aFieldsets ) ) {
231 231
                 return ''; 
232 232
             }
233 233
 
@@ -239,13 +239,13 @@  discard block
 block discarded – undo
239 239
             );
240 240
             $_sSectionTabSlug   = $_aFirstSectionset[ 'section_tab_slug' ];
241 241
             $_sThisSectionID    = $_aFirstSectionset[ 'section_id' ];
242
-            $_sSectionsID       = 'sections-' . $_sThisSectionID;
242
+            $_sSectionsID       = 'sections-'.$_sThisSectionID;
243 243
             $_aCollapsible      = $this->_getCollapsibleArgumentForSections( 
244 244
                 $_aFirstSectionset 
245 245
             );
246 246
                         
247
-            foreach( $aSectionsets as $_aSectionset ) {
248
-                $_aOutputs          = $this->_getSectionsetTable(
247
+            foreach ( $aSectionsets as $_aSectionset ) {
248
+                $_aOutputs = $this->_getSectionsetTable(
249 249
                     $_aOutputs,
250 250
                     $_sSectionsID,
251 251
                     $_aSectionset,
@@ -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' ],
@@ -301,19 +301,19 @@  discard block
 block discarded – undo
301 301
              */
302 302
             private function _getSectionsetTable( $_aOutputs, $_sSectionsID, array $_aSection, array $aFieldsInSections ) {
303 303
             
304
-                if ( ! $this->isSectionsetVisible( $_aSection ) ) {
304
+                if ( !$this->isSectionsetVisible( $_aSection ) ) {
305 305
                     return $_aOutputs;
306 306
                 }
307 307
 
308 308
                 // If the 'save' argument is false, insert a flag that disables saving the section inputs.
309
-                $_aOutputs[ 'section_contents' ][] = $this->_getUnsetFlagSectionInputTag( $_aSection );
309
+                $_aOutputs[ 'section_contents' ][ ] = $this->_getUnsetFlagSectionInputTag( $_aSection );
310 310
                 
311 311
                 // For repeatable sections - sub-sections are divided field definition arrays by sub-section index, 
312 312
                 // not section definition arrays.
313
-                $_aSubSections      = $this->getIntegerKeyElements( 
313
+                $_aSubSections = $this->getIntegerKeyElements( 
314 314
                     $this->getElementAsArray(
315 315
                         $aFieldsInSections, // subject array
316
-                        $_aSection[ '_section_path' ],  // dimensional path
316
+                        $_aSection[ '_section_path' ], // dimensional path
317 317
                         array() // default
318 318
                     )
319 319
                 );
@@ -356,28 +356,28 @@  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' ] ) ) {
370
-                        $_aOutputs[ 'section_contents' ][] = AdminPageFramework_Form_View___Script_SortableSection::getEnabler( 
369
+                    if ( !empty( $_aSection[ 'sortable' ] ) ) {
370
+                        $_aOutputs[ 'section_contents' ][ ] = AdminPageFramework_Form_View___Script_SortableSection::getEnabler( 
371 371
                             $_sSectionsID, 
372 372
                             $_aSection[ 'sortable' ],
373 373
                             $this->oMsg
374 374
                         );
375
-                        $_aOutputs[ 'section_contents' ][] = $this->_getSortableSectionFlagTag( $_aSection );
375
+                        $_aOutputs[ 'section_contents' ][ ] = $this->_getSortableSectionFlagTag( $_aSection );
376 376
                     }
377 377
                     
378 378
                     // Get the section tables.
379 379
                     $_aSubSections = $this->numerizeElements( $_aSubSections ); // will include the main section as well.
380
-                    foreach( $_aSubSections as $_iIndex => $_aFields ) { 
380
+                    foreach ( $_aSubSections as $_iIndex => $_aFields ) { 
381 381
 
382 382
                         $_oEachSectionArguments = new AdminPageFramework_Form_Model___Format_EachSection(
383 383
                             $_aSection,
@@ -407,8 +407,8 @@  discard block
 block discarded – undo
407 407
                         array(
408 408
                             'class'                     => 'element-address',
409 409
                             'type'                      => 'hidden',
410
-                            'name'                      => '__repeatable_elements_' . $aSection[ '_structure_type' ] 
411
-                                . '[' . $aSection[ 'section_id' ] . ']',
410
+                            'name'                      => '__repeatable_elements_'.$aSection[ '_structure_type' ] 
411
+                                . '['.$aSection[ 'section_id' ].']',
412 412
                             // @todo examine whether this value should include a section index.
413 413
                             'value' => $aSection[ 'section_id' ],                            
414 414
                         )
@@ -426,8 +426,8 @@  discard block
 block discarded – undo
426 426
                         array(
427 427
                             'class'                     => 'element-address',
428 428
                             'type'                      => 'hidden',
429
-                            'name'                      => '__sortable_elements_' . $aSection[ '_structure_type' ] 
430
-                                . '[' . $aSection[ 'section_id' ] . ']',
429
+                            'name'                      => '__sortable_elements_'.$aSection[ '_structure_type' ] 
430
+                                . '['.$aSection[ 'section_id' ].']',
431 431
                             // @todo examine whether this value should include a section index.
432 432
                             'value' => $aSection[ 'section_id' ],                            
433 433
                         )
@@ -449,8 +449,8 @@  discard block
 block discarded – undo
449 449
                         'input',
450 450
                         array(
451 451
                             'type'  => 'hidden',
452
-                            'name'  => '__unset_' .  $aSection[ '_structure_type' ] . '[' . $aSection[ 'section_id' ] . ']',
453
-                            'value' => "__dummy_option_key|" . $aSection[ 'section_id' ],
452
+                            'name'  => '__unset_'.$aSection[ '_structure_type' ].'['.$aSection[ 'section_id' ].']',
453
+                            'value' => "__dummy_option_key|".$aSection[ 'section_id' ],
454 454
                             'class' => 'unset-element-names element-address',
455 455
                         )
456 456
                     );            
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
                 private function _getSectionTableWithTabList( array $_aOutputs, array $aSectionset, $aFieldsetsPerSection ) {
467 467
                                         
468 468
                     // Tab list
469
-                    $_aOutputs[ 'section_tab_list' ][] = $this->_getTabList( 
469
+                    $_aOutputs[ 'section_tab_list' ][ ] = $this->_getTabList( 
470 470
                         $aSectionset, 
471 471
                         $aFieldsetsPerSection, 
472 472
                         $this->aCallbacks[ 'fieldset_output' ]
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
 
475 475
                     // Section container
476 476
                     $_oSectionTable = new AdminPageFramework_Form_View___Section(
477
-                        $this->aArguments,  // for nested sections
477
+                        $this->aArguments, // for nested sections
478 478
                         $aSectionset,
479 479
                         $this->aStructure,
480 480
                         $aFieldsetsPerSection,
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
                         $this->aCallbacks,
485 485
                         $this->oMsg
486 486
                     );
487
-                    $_aOutputs[ 'section_contents' ][] = $_oSectionTable->get();                    
487
+                    $_aOutputs[ 'section_contents' ][ ] = $_oSectionTable->get();                    
488 488
                    
489 489
                     return $_aOutputs;
490 490
                  
@@ -512,9 +512,9 @@  discard block
 block discarded – undo
512 512
                         'section_index'     => null,
513 513
                         'collapsible'       => $aCollapsible,
514 514
                         'container_type'    => 'sections', // section or sections                    
515
-                        'sectionset'        => $aSectionset,    // 3.7.0+ for tooltip
515
+                        'sectionset'        => $aSectionset, // 3.7.0+ for tooltip
516 516
                     ),
517
-                    array(),            // fieldsets
517
+                    array(), // fieldsets
518 518
                     $this->aSavedData,   
519 519
                     $this->aFieldErrors, 
520 520
                     $this->aStructure[ 'field_type_definitions' ], 
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
                     $aOutputs[ 'count_subsections' ]
532 532
                 );
533 533
                 return $_oCollapsibleSectionTitle->get()
534
-                    . "<div " . $_oSectionsTablesContainerAttributes->get() . ">"
534
+                    . "<div ".$_oSectionsTablesContainerAttributes->get().">"
535 535
                         . $this->_getSectionTabList( $sSectionTabSlug, $aOutputs[ 'section_tab_list' ] )
536 536
                         . implode( PHP_EOL, $aOutputs[ 'section_contents' ] )
537 537
                     . "</div>";
@@ -562,21 +562,21 @@  discard block
 block discarded – undo
562 562
              */
563 563
             private function _getTabList( array $aSection, array $aFields, $hfFieldCallback ) {
564 564
                                 
565
-                if ( ! $aSection[ 'section_tab_slug' ] ) {
565
+                if ( !$aSection[ 'section_tab_slug' ] ) {
566 566
                     return '';
567 567
                 }
568 568
                 
569 569
                 $iSectionIndex      = $aSection[ '_index' ];
570 570
 
571
-                $_sSectionTagID     = 'section-' . $aSection[ 'section_id' ] . '__' . $iSectionIndex;
571
+                $_sSectionTagID     = 'section-'.$aSection[ 'section_id' ].'__'.$iSectionIndex;
572 572
                 $_aTabAttributes    = $aSection[ 'attributes' ][ 'tab' ]
573 573
                     + array(
574 574
                         'class' => 'admin-page-framework-section-tab nav-tab',
575 575
                         'id'    => "section_tab-{$_sSectionTagID}",
576 576
                         'style' => null
577 577
                     );
578
-                $_aTabAttributes[ 'class' ] = $this->getClassAttribute( $_aTabAttributes[ 'class' ], $aSection[ 'class' ][ 'tab' ] );  // 3.3.1+
579
-                $_aTabAttributes[ 'style' ] = $this->getStyleAttribute( $_aTabAttributes[ 'style' ], $aSection[ 'hidden' ] ? 'display:none' : null );  // 3.3.1+
578
+                $_aTabAttributes[ 'class' ] = $this->getClassAttribute( $_aTabAttributes[ 'class' ], $aSection[ 'class' ][ 'tab' ] ); // 3.3.1+
579
+                $_aTabAttributes[ 'style' ] = $this->getStyleAttribute( $_aTabAttributes[ 'style' ], $aSection[ 'hidden' ] ? 'display:none' : null ); // 3.3.1+
580 580
                 
581 581
                 $_oSectionTitle = new AdminPageFramework_Form_View___SectionTitle(                    
582 582
                     array(
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
                         'tag'           => 'h4',
585 585
                         'section_index' => $iSectionIndex,
586 586
                         
587
-                        'sectionset'    => $aSection,   // 3.7.0+      for tooltip
587
+                        'sectionset'    => $aSection, // 3.7.0+      for tooltip
588 588
                     ),
589 589
                     $aFields,            
590 590
                     $this->aSavedData,   
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
                     $this->aCallbacks // field output element callables.                    
595 595
                 );                        
596 596
                 
597
-                return "<li " . $this->getAttributes( $_aTabAttributes ) . ">"
597
+                return "<li ".$this->getAttributes( $_aTabAttributes ).">"
598 598
                     . "<a href='#{$_sSectionTagID}'>"
599 599
                         . $_oSectionTitle->get()
600 600
                     ."</a>"
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,6 +165,7 @@  discard block
 block discarded – undo
165 165
     }
166 166
         /**
167 167
          * @since       3.7.0
168
+         * @param string $_sOutput
168 169
          * @return      string
169 170
          */
170 171
         private function _getSpinnerOutput( $_sOutput ) {
@@ -299,7 +300,7 @@  discard block
 block discarded – undo
299 300
              * @param       array       $_aOutputs      Holds output elements - contents, section tab list, count of subsections.
300 301
              * @param       string      $_sSectionsID   The container id of sections.
301 302
              * @param       array       $_aSection
302
-             * @param       array       $_aFieldsInSections     A field-sets array already divided by section tab.
303
+             * @param       array       $aFieldsInSections     A field-sets array already divided by section tab.
303 304
              * @return      array       The updated sections table output array.
304 305
              */
305 306
             private function _getSectionsetTable( $_aOutputs, $_sSectionsID, array $_aSection, array $aFieldsInSections ) {
@@ -354,6 +355,7 @@  discard block
 block discarded – undo
354 355
                  * Returns the output of sub-sections for repeatable and sortable sections.
355 356
                  * 
356 357
                  * @since       3.7.0
358
+                 * @param string $_sSectionsID
357 359
                  * @return      array
358 360
                  */
359 361
                 private function _getSubSections( $_aOutputs, $_sSectionsID, $_aSection, $_aSubSections ) {
@@ -500,6 +502,7 @@  discard block
 block discarded – undo
500 502
              * @since       3.5.3
501 503
              * @since       3.6.0       Removed the `$sSectionID` parameter. Added the `$aSectionset` parameter.
502 504
              * @since       3.7.0       Moved from `AdminPageFramework_FormPart_Table`.
505
+             * @param string $sSectionsID
503 506
              * @return      string      The formatted sections table HTML output.
504 507
              */
505 508
             private function _getFormattedSectionsTablesOutput( array $aOutputs, $aSectionset, $sSectionsID, array $aCollapsible, $sSectionTabSlug ) {
Please login to merge, or discard this patch.
form/_view/sectionset/AdminPageFramework_Form_View___SectionCaption.php 2 patches
Spacing   +10 added lines, -10 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
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                     'collapsible'       => $_abCollapsible,
103 103
                     'container_type'    => 'section', // section or sections                    
104 104
                     
105
-                    'sectionset'        => $aSectionset,    // 3.7.0+ for tooltip
105
+                    'sectionset'        => $aSectionset, // 3.7.0+ for tooltip
106 106
                 ),
107 107
                 $aFieldsets,            
108 108
                 $this->aSavedData,   
@@ -112,15 +112,15 @@  discard block
 block discarded – undo
112 112
                 $aCallbacks // field output element callables.                
113 113
             );            
114 114
             
115
-            $_bShowTitle    = empty( $_abCollapsible ) && ! $aSectionset[ 'section_tab_slug' ];
115
+            $_bShowTitle = empty( $_abCollapsible ) && !$aSectionset[ 'section_tab_slug' ];
116 116
             return 
117
-                "<caption " . $this->getAttributes( 
117
+                "<caption ".$this->getAttributes( 
118 118
                     array(
119 119
                         'class'             => 'admin-page-framework-section-caption',
120 120
                         // data-section_tab is referred by the repeater script to hide/show the title and the description
121 121
                         'data-section_tab'  => $aSectionset[ 'section_tab_slug' ],
122 122
                     ) 
123
-                ) . ">"
123
+                ).">"
124 124
                     . $_oCollapsibleSectionTitle->get()
125 125
                     . $this->getAOrB(
126 126
                         $_bShowTitle,
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
                         'tag'           => 'h3',
175 175
                         'section_index' => $iSectionIndex,
176 176
                         
177
-                        'sectionset'    => $aSectionset,    // 3.7.0+ for tooltip
177
+                        'sectionset'    => $aSectionset, // 3.7.0+ for tooltip
178 178
                     ),
179 179
                     $aFieldsets,            
180 180
                     $this->aSavedData,   
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
                     $this->oMsg,
184 184
                     $this->aCallbacks // field output element callables.
185 185
                 );
186
-                return "<div " . $this->getAttributes(
186
+                return "<div ".$this->getAttributes(
187 187
                         array(
188 188
                             'class' => 'admin-page-framework-section-title',
189 189
                             'style' => $this->getAOrB(
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
                                 'display: none;'
193 193
                             ),
194 194
                         )
195
-                    ). ">" 
195
+                    ).">" 
196 196
                         . $_oSectionTitle->get()
197 197
                     . "</div>";                
198 198
             }
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
                 if ( $aSectionset[ 'collapsible' ] ) {
209 209
                     return '';
210 210
                 }
211
-                if ( ! is_callable( $hfSectionCallback ) ) {
211
+                if ( !is_callable( $hfSectionCallback ) ) {
212 212
                     return '';
213 213
                 }
214 214
                 
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
              */
241 241
             private function _shouldShowCaptionTitle( $aSectionset, $iSectionIndex ) {
242 242
                 
243
-                if ( ! $aSectionset[ 'title' ] ){
243
+                if ( !$aSectionset[ 'title' ] ) {
244 244
                     return false;
245 245
                 }
246 246
                 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.