Completed
Branch dev (69a0d4)
by
unknown
33:44
created
form/_view/sectionset/AdminPageFramework_Form_View___SectionTitle.php 2 patches
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.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,14 +18,14 @@  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 26
         'sectionset'    => array(),
27 27
     );
28
-    public $aFieldsets               = array();
28
+    public $aFieldsets = array();
29 29
     public $aSavedData              = array();
30 30
     public $aFieldErrors            = array();
31 31
     public $aFieldTypeDefinitions   = array();
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         private function _getToolTip() {
84 84
             
85 85
             $_aSectionset        = $this->aArguments[ 'sectionset' ];
86
-            $_sSectionTitleTagID = str_replace( '|', '_', $_aSectionset[ '_section_path' ]  ) . '_' . $this->aArguments[ 'section_index' ];
86
+            $_sSectionTitleTagID = str_replace( '|', '_', $_aSectionset[ '_section_path' ] ).'_'.$this->aArguments[ 'section_index' ];
87 87
             $_oToolTip           = new AdminPageFramework_Form_View___ToolTip(
88 88
                 $_aSectionset[ 'tip' ],
89 89
                 $_sSectionTitleTagID
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
          * @since       DEVVER      Moved from `AdminPageFramework_FormPart_SectionTitle`.
103 103
          * @return      string      The section title output. 
104 104
          */
105
-        protected function _getSectionTitle( $sTitle, $sTag, $aFieldsets, $iSectionIndex=null, $aFieldTypeDefinitions=array() ) {
105
+        protected function _getSectionTitle( $sTitle, $sTag, $aFieldsets, $iSectionIndex = null, $aFieldTypeDefinitions = array() ) {
106 106
        
107 107
             $_aSectionTitleField = $this->_getSectionTitleField( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions );
108 108
             return $_aSectionTitleField
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
              */
124 124
             private function _getSectionTitleField( array $aFieldsetsets, $iSectionIndex, $aFieldTypeDefinitions ) {   
125 125
             
126
-                foreach( $aFieldsetsets as $_aFieldsetset ) {
126
+                foreach ( $aFieldsetsets as $_aFieldsetset ) {
127 127
                     
128 128
                     if ( 'section_title' !== $_aFieldsetset[ 'type' ] ) {
129 129
                         continue;
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   +41 added lines, -41 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
                  
@@ -514,9 +514,9 @@  discard block
 block discarded – undo
514 514
                         'section_index'     => null,
515 515
                         'collapsible'       => $aCollapsible,
516 516
                         'container_type'    => 'sections', // section or sections                    
517
-                        'sectionset'        => $aSectionset,    // DEVVER+ for tooltip
517
+                        'sectionset'        => $aSectionset, // DEVVER+ for tooltip
518 518
                     ),
519
-                    array(),            // fieldsets
519
+                    array(), // fieldsets
520 520
                     $this->aSavedData,   
521 521
                     $this->aFieldErrors, 
522 522
                     $this->aStructure[ 'field_type_definitions' ], 
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
                     $aOutputs[ 'count_subsections' ]
534 534
                 );
535 535
                 return $_oCollapsibleSectionTitle->get()
536
-                    . "<div " . $_oSectionsTablesContainerAttributes->get() . ">"
536
+                    . "<div ".$_oSectionsTablesContainerAttributes->get().">"
537 537
                         . $this->_getSectionTabList( $sSectionTabSlug, $aOutputs[ 'section_tab_list' ] )
538 538
                         . implode( PHP_EOL, $aOutputs[ 'section_contents' ] )
539 539
                     . "</div>";
@@ -564,21 +564,21 @@  discard block
 block discarded – undo
564 564
              */
565 565
             private function _getTabList( array $aSection, array $aFields, $hfFieldCallback ) {
566 566
                                 
567
-                if ( ! $aSection[ 'section_tab_slug' ] ) {
567
+                if ( !$aSection[ 'section_tab_slug' ] ) {
568 568
                     return '';
569 569
                 }
570 570
                 
571 571
                 $iSectionIndex      = $aSection[ '_index' ];
572 572
 
573
-                $_sSectionTagID     = 'section-' . $aSection[ 'section_id' ] . '__' . $iSectionIndex;
573
+                $_sSectionTagID     = 'section-'.$aSection[ 'section_id' ].'__'.$iSectionIndex;
574 574
                 $_aTabAttributes    = $aSection[ 'attributes' ][ 'tab' ]
575 575
                     + array(
576 576
                         'class' => 'admin-page-framework-section-tab nav-tab',
577 577
                         'id'    => "section_tab-{$_sSectionTagID}",
578 578
                         'style' => null
579 579
                     );
580
-                $_aTabAttributes[ 'class' ] = $this->getClassAttribute( $_aTabAttributes[ 'class' ], $aSection[ 'class' ][ 'tab' ] );  // 3.3.1+
581
-                $_aTabAttributes[ 'style' ] = $this->getStyleAttribute( $_aTabAttributes[ 'style' ], $aSection[ 'hidden' ] ? 'display:none' : null );  // 3.3.1+
580
+                $_aTabAttributes[ 'class' ] = $this->getClassAttribute( $_aTabAttributes[ 'class' ], $aSection[ 'class' ][ 'tab' ] ); // 3.3.1+
581
+                $_aTabAttributes[ 'style' ] = $this->getStyleAttribute( $_aTabAttributes[ 'style' ], $aSection[ 'hidden' ] ? 'display:none' : null ); // 3.3.1+
582 582
                 
583 583
                 $_oSectionTitle = new AdminPageFramework_Form_View___SectionTitle(                    
584 584
                     array(
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
                         'tag'           => 'h4',
587 587
                         'section_index' => $iSectionIndex,
588 588
                         
589
-                        'sectionset'    => $aSection,   // DEVVER+      for tooltip
589
+                        'sectionset'    => $aSection, // DEVVER+      for tooltip
590 590
                     ),
591 591
                     $aFields,            
592 592
                     $this->aSavedData,   
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
                     $this->aCallbacks // field output element callables.                    
597 597
                 );                        
598 598
                 
599
-                return "<li " . $this->getAttributes( $_aTabAttributes ) . ">"
599
+                return "<li ".$this->getAttributes( $_aTabAttributes ).">"
600 600
                     . "<a href='#{$_sSectionTagID}'>"
601 601
                         . $_oSectionTitle->get()
602 602
                     ."</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.
factory/_abstract/form/field_type/AdminPageFramework_FieldType.php 2 patches
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.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      * @since       3.5.0     
39 39
      * @callback    fieldtype   hfDoOnRegistration
40 40
      */
41
-    public function _replyToDoOnFieldRegistration( array $aField ) { 
41
+    public function _replyToDoOnFieldRegistration( array $aField ) {
42 42
         return $this->doOnFieldRegistration( $aField ); 
43 43
     }
44 44
    
Please login to merge, or discard this patch.
factory/_abstract/form/field_type/AdminPageFramework_FieldType_Base.php 2 patches
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -98,14 +98,14 @@  discard block
 block discarded – undo
98 98
      * @param       object              $oMsg                   The framework message object.
99 99
      * @param       boolean             $bAutoRegister          Whether or not to register the field type(s).
100 100
      */
101
-    function __construct( $asClassName='admin_page_framework', $asFieldTypeSlug=null, $oMsg=null, $bAutoRegister=true ) {
101
+    function __construct( $asClassName = 'admin_page_framework', $asFieldTypeSlug = null, $oMsg = null, $bAutoRegister = true ) {
102 102
             
103 103
         $this->aFieldTypeSlugs  = empty( $asFieldTypeSlug ) ? $this->aFieldTypeSlugs : ( array ) $asFieldTypeSlug;
104 104
         $this->oMsg             = $oMsg ? $oMsg : AdminPageFramework_Message::getInstance();
105 105
         
106 106
         // This automatically registers the field type. The build-in ones will be registered manually so it will be skipped.
107 107
         if ( $bAutoRegister ) {
108
-            foreach( ( array ) $asClassName as $_sClassName  ) {
108
+            foreach ( ( array ) $asClassName as $_sClassName ) {
109 109
                 add_filter( "field_types_{$_sClassName}", array( $this, '_replyToRegisterInputFieldType' ) );
110 110
             }
111 111
         }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      * @return      boolean
132 132
      */
133 133
     protected function isTinyMCESupported() {
134
-        return version_compare( $GLOBALS['wp_version'], '3.3', '>=' )
134
+        return version_compare( $GLOBALS[ 'wp_version' ], '3.3', '>=' )
135 135
             && function_exists( 'wp_editor' )
136 136
         ;
137 137
     }
@@ -146,8 +146,8 @@  discard block
 block discarded – undo
146 146
     protected function getElementByLabel( $asElement, $sKey, $bIsLabelArray ) {
147 147
         return $bIsLabelArray
148 148
             ? $this->getElement( 
149
-                $asElement,         // subject
150
-                array( $sKey ),     // keys
149
+                $asElement, // subject
150
+                array( $sKey ), // keys
151 151
                 $asElement          // default
152 152
             )
153 153
             : $asElement;
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      */
163 163
     protected function geFieldOutput( array $aFieldset ) {
164 164
         
165
-        if ( ! is_object( $aFieldset[ '_caller_object' ] ) ) {
165
+        if ( !is_object( $aFieldset[ '_caller_object' ] ) ) {
166 166
             return '';
167 167
         }
168 168
 
@@ -170,14 +170,14 @@  discard block
 block discarded – undo
170 170
         $aFieldset[ '_parent_field_object' ] = $aFieldset[ '_field_object' ]; // 3.6.0+
171 171
         
172 172
         // DEVVER+ The caller object is no longer a factory object but a form object.
173
-        $_oCallerForm   = $aFieldset[ '_caller_object' ];
173
+        $_oCallerForm = $aFieldset[ '_caller_object' ];
174 174
 
175 175
         $_oFieldset = new AdminPageFramework_Form_View___Fieldset( 
176
-            $aFieldset,                          // the field definition array
177
-            $_oCallerForm->aSavedData,               // the stored form data
178
-            $_oCallerForm->getFieldErrors(),         // the field error array.
179
-            $_oCallerForm->aFieldTypeDefinitions,    // the field type definition array.
180
-            $_oCallerForm->oMsg,                     // the system message object
176
+            $aFieldset, // the field definition array
177
+            $_oCallerForm->aSavedData, // the stored form data
178
+            $_oCallerForm->getFieldErrors(), // the field error array.
179
+            $_oCallerForm->aFieldTypeDefinitions, // the field type definition array.
180
+            $_oCallerForm->oMsg, // the system message object
181 181
             $_oCallerForm->aCallbacks                // field output element callables.
182 182
         );           
183 183
         return $_oFieldset->get();
@@ -224,13 +224,13 @@  discard block
 block discarded – undo
224 224
      * @since       3.0.3       Tweaked it to have better execution speed.
225 225
      * @internal
226 226
      */
227
-    public function getDefinitionArray( $sFieldTypeSlug='' ) {
227
+    public function getDefinitionArray( $sFieldTypeSlug = '' ) {
228 228
         
229 229
         // The uniteArrays() method resulted in somewhat being slow due to overhead on checking array keys for recursive array merges.
230 230
         $_aDefaultKeys = $this->aDefaultKeys + self::$_aDefaultKeys;
231
-        $_aDefaultKeys['attributes'] = isset( $this->aDefaultKeys['attributes'] ) && is_array( $this->aDefaultKeys['attributes'] )
232
-            ? $this->aDefaultKeys['attributes'] + self::$_aDefaultKeys['attributes'] 
233
-            : self::$_aDefaultKeys['attributes'];
231
+        $_aDefaultKeys[ 'attributes' ] = isset( $this->aDefaultKeys[ 'attributes' ] ) && is_array( $this->aDefaultKeys[ 'attributes' ] )
232
+            ? $this->aDefaultKeys[ 'attributes' ] + self::$_aDefaultKeys[ 'attributes' ] 
233
+            : self::$_aDefaultKeys[ 'attributes' ];
234 234
         
235 235
         return array(
236 236
             'sFieldTypeSlug'        => $sFieldTypeSlug,
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
      * @since       3.0.0
269 269
      * @internal
270 270
      */
271
-    public function _replyToFieldTypeSetter( $sFieldSetType='' ) {
271
+    public function _replyToFieldTypeSetter( $sFieldSetType = '' ) {
272 272
         $this->_sFieldSetType = $sFieldSetType;
273 273
     }
274 274
     
@@ -322,8 +322,8 @@  discard block
 block discarded – undo
322 322
             wp_enqueue_script( 'media-upload' );    
323 323
         }
324 324
 
325
-        if ( in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php', ) ) ) {     
326
-            add_filter( 'gettext', array( $this, '_replyToReplaceThickBoxText' ) , 1, 2 );     
325
+        if ( in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php',) ) ) {     
326
+            add_filter( 'gettext', array( $this, '_replyToReplaceThickBoxText' ), 1, 2 );     
327 327
         }
328 328
         
329 329
     }
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
         public function _replyToReplaceThickBoxText( $sTranslated, $sText ) {
339 339
 
340 340
             // Replace the button label in the media thick box.
341
-            if ( ! in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php' ) ) ) { 
341
+            if ( !in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php' ) ) ) { 
342 342
                 return $sTranslated; 
343 343
             }
344 344
             if ( $sText !== 'Insert into Post' ) { 
@@ -348,8 +348,8 @@  discard block
 block discarded – undo
348 348
                 return $sTranslated; 
349 349
             }
350 350
             
351
-            if ( isset( $_GET['button_label'] ) ) { 
352
-                return $_GET['button_label']; 
351
+            if ( isset( $_GET[ 'button_label' ] ) ) { 
352
+                return $_GET[ 'button_label' ]; 
353 353
             }
354 354
 
355 355
             return $this->oProp->sThickBoxButtonUseThis 
@@ -368,12 +368,12 @@  discard block
 block discarded – undo
368 368
          */
369 369
         public function _replyToRemovingMediaLibraryTab( $aTabs ) {
370 370
             
371
-            if ( ! isset( $_REQUEST['enable_external_source'] ) ) { 
371
+            if ( !isset( $_REQUEST[ 'enable_external_source' ] ) ) { 
372 372
                 return $aTabs; 
373 373
             }
374 374
             
375
-            if ( ! $_REQUEST['enable_external_source'] ) {
376
-                unset( $aTabs['type_url'] ); // removes the 'From URL' tab in the thick box.
375
+            if ( !$_REQUEST[ 'enable_external_source' ] ) {
376
+                unset( $aTabs[ 'type_url' ] ); // removes the 'From URL' tab in the thick box.
377 377
             }
378 378
             return $aTabs;
379 379
             
Please login to merge, or discard this patch.
Braces   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -315,14 +315,14 @@  discard block
 block discarded – undo
315 315
         wp_enqueue_script( 'thickbox' );
316 316
         wp_enqueue_style( 'thickbox' );
317 317
     
318
-        if ( function_exists( 'wp_enqueue_media' ) ) {     
318
+        if ( function_exists( 'wp_enqueue_media' ) ) {
319 319
             // If the WordPress version is 3.5 or above,
320 320
             new AdminPageFramework_Form_View___Script_MediaUploader( $this->oMsg );
321 321
         } else {
322 322
             wp_enqueue_script( 'media-upload' );    
323 323
         }
324 324
 
325
-        if ( in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php', ) ) ) {     
325
+        if ( in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php', ) ) ) {
326 326
             add_filter( 'gettext', array( $this, '_replyToReplaceThickBoxText' ) , 1, 2 );     
327 327
         }
328 328
         
@@ -338,17 +338,17 @@  discard block
 block discarded – undo
338 338
         public function _replyToReplaceThickBoxText( $sTranslated, $sText ) {
339 339
 
340 340
             // Replace the button label in the media thick box.
341
-            if ( ! in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php' ) ) ) { 
341
+            if ( ! in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php' ) ) ) {
342 342
                 return $sTranslated; 
343 343
             }
344
-            if ( $sText !== 'Insert into Post' ) { 
344
+            if ( $sText !== 'Insert into Post' ) {
345 345
                 return $sTranslated; 
346 346
             }
347
-            if ( $this->getQueryValueInURLByKey( wp_get_referer(), 'referrer' ) !== 'admin_page_framework' ) { 
347
+            if ( $this->getQueryValueInURLByKey( wp_get_referer(), 'referrer' ) !== 'admin_page_framework' ) {
348 348
                 return $sTranslated; 
349 349
             }
350 350
             
351
-            if ( isset( $_GET['button_label'] ) ) { 
351
+            if ( isset( $_GET['button_label'] ) ) {
352 352
                 return $_GET['button_label']; 
353 353
             }
354 354
 
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
          */
369 369
         public function _replyToRemovingMediaLibraryTab( $aTabs ) {
370 370
             
371
-            if ( ! isset( $_REQUEST['enable_external_source'] ) ) { 
371
+            if ( ! isset( $_REQUEST['enable_external_source'] ) ) {
372 372
                 return $aTabs; 
373 373
             }
374 374
             
Please login to merge, or discard this patch.
factory/_abstract/form/field_type/AdminPageFramework_FieldType_checkbox.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
      * Defines the default key-values of this field type. 
28 28
      */
29 29
     protected $aDefaultKeys = array(
30
-        'select_all_button'     => false,        // 3.3.0+   to change the label, set the label here
31
-        'select_none_button'    => false,        // 3.3.0+   to change the label, set the label here
30
+        'select_all_button'     => false, // 3.3.0+   to change the label, set the label here
31
+        'select_none_button'    => false, // 3.3.0+   to change the label, set the label here
32 32
     );
33 33
         
34 34
     /**
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */ 
40 40
     protected function getScripts() {
41 41
         new AdminPageFramework_Form_View___Script_CheckboxSelector;
42
-        $_sClassSelectorSelectAll  = $this->_getSelectButtonClassSelectors( 
42
+        $_sClassSelectorSelectAll = $this->_getSelectButtonClassSelectors( 
43 43
             $this->aFieldTypeSlugs, 
44 44
             'select_all_button' // data attribute
45 45
         );
@@ -65,14 +65,14 @@  discard block
 block discarded – undo
65 65
          * @since       3.5.12
66 66
          * @return      string
67 67
          */
68
-        private function _getSelectButtonClassSelectors( array $aFieldTypeSlugs, $sDataAttribute='select_all_button' ) {
68
+        private function _getSelectButtonClassSelectors( array $aFieldTypeSlugs, $sDataAttribute = 'select_all_button' ) {
69 69
             
70 70
             $_aClassSelectors = array();
71 71
             foreach ( $aFieldTypeSlugs as $_sSlug ) {
72
-                if ( ! is_scalar( $_sSlug ) ) {
72
+                if ( !is_scalar( $_sSlug ) ) {
73 73
                     continue;
74 74
                 }
75
-                $_aClassSelectors[] = '.admin-page-framework-checkbox-container-' . $_sSlug . "[data-{$sDataAttribute}]";
75
+                $_aClassSelectors[ ] = '.admin-page-framework-checkbox-container-'.$_sSlug."[data-{$sDataAttribute}]";
76 76
             }
77 77
             return implode( ',', $_aClassSelectors );
78 78
             
@@ -128,8 +128,8 @@  discard block
 block discarded – undo
128 128
 
129 129
         $_aOutput       = array();
130 130
         $_bIsMultiple   = is_array( $aField[ 'label' ] );
131
-        foreach( $this->getAsArray( $aField[ 'label' ], true ) as $_sKey => $_sLabel ) {
132
-            $_aOutput[] = $this->_getEachCheckboxOutput( 
131
+        foreach ( $this->getAsArray( $aField[ 'label' ], true ) as $_sKey => $_sLabel ) {
132
+            $_aOutput[ ] = $this->_getEachCheckboxOutput( 
133 133
                 $aField, 
134 134
                 $_bIsMultiple 
135 135
                     ? $_sKey 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
                 $_sLabel
138 138
             );
139 139
         }        
140
-        return "<div " . $this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ) . ">"
140
+        return "<div ".$this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ).">"
141 141
                 . "<div class='repeatable-field-buttons'></div>" // the repeatable field buttons will be replaced with this element.
142 142
                 . implode( PHP_EOL, $_aOutput )
143 143
             . "</div>";
@@ -152,12 +152,12 @@  discard block
 block discarded – undo
152 152
          */
153 153
         protected function _getCheckboxContainerAttributes( array $aField ) {
154 154
             return array(
155
-                'class'                     => 'admin-page-framework-checkbox-container-' . $aField[ 'type' ],
155
+                'class'                     => 'admin-page-framework-checkbox-container-'.$aField[ 'type' ],
156 156
                 'data-select_all_button'    => $aField[ 'select_all_button' ] 
157
-                    ? ( ! is_string( $aField[ 'select_all_button' ] ) ? $this->oMsg->get( 'select_all' ) : $aField[ 'select_all_button' ] )
157
+                    ? ( !is_string( $aField[ 'select_all_button' ] ) ? $this->oMsg->get( 'select_all' ) : $aField[ 'select_all_button' ] )
158 158
                     : null,
159 159
                 'data-select_none_button'   => $aField[ 'select_none_button' ] 
160
-                    ? ( ! is_string( $aField[ 'select_none_button' ] ) ? $this->oMsg->get( 'select_none' ) : $aField[ 'select_none_button' ] )
160
+                    ? ( !is_string( $aField[ 'select_none_button' ] ) ? $this->oMsg->get( 'select_none' ) : $aField[ 'select_none_button' ] )
161 161
                     : null,
162 162
             );            
163 163
         }
@@ -174,8 +174,8 @@  discard block
 block discarded – undo
174 174
             $_oCheckbox->setAttributesByKey( $sKey );
175 175
             $_oCheckbox->addClass( $this->_sCheckboxClassSelector );                        
176 176
             return $this->getElement( $aField, array( 'before_label', $sKey ) )
177
-                . "<div class='admin-page-framework-input-label-container admin-page-framework-checkbox-label' style='min-width: " . $this->sanitizeLength( $aField[ 'label_min_width' ] ) . ";'>"
178
-                    . "<label " . $this->getAttributes( 
177
+                . "<div class='admin-page-framework-input-label-container admin-page-framework-checkbox-label' style='min-width: ".$this->sanitizeLength( $aField[ 'label_min_width' ] ).";'>"
178
+                    . "<label ".$this->getAttributes( 
179 179
                         array(
180 180
                             'for'   => $_oCheckbox->getAttribute( 'id' ),
181 181
                             'class' => $_oCheckbox->getAttribute( 'disabled' )
Please login to merge, or discard this patch.
factory/_abstract/form/field_type/AdminPageFramework_FieldType_color.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     protected function setUp() {
47 47
         
48 48
         // If the WordPress version is greater than or equal to 3.5, then load the new WordPress color picker.
49
-        if ( version_compare( $GLOBALS['wp_version'], '3.5', '>=' ) ) {
49
+        if ( version_compare( $GLOBALS[ 'wp_version' ], '3.5', '>=' ) ) {
50 50
             //Both the necessary css and javascript have been registered already by WordPress, so all we have to do is load them with their handle.
51 51
             wp_enqueue_style( 'wp-color-picker' );
52 52
             wp_enqueue_script( 'wp-color-picker' );
@@ -209,29 +209,29 @@  discard block
 block discarded – undo
209 209
     protected function getField( $aField ) {
210 210
 
211 211
         // If the value is not set, apply the default value, 'transparent'.
212
-        $aField['value'] = is_null( $aField['value'] ) 
212
+        $aField[ 'value' ] = is_null( $aField[ 'value' ] ) 
213 213
             ? 'transparent' 
214
-            : $aField['value'];    
214
+            : $aField[ 'value' ];    
215 215
             
216 216
         $aField[ 'attributes' ] = $this->_getInputAttributes( $aField );
217 217
         
218 218
         return 
219
-            $aField['before_label']
219
+            $aField[ 'before_label' ]
220 220
             . "<div class='admin-page-framework-input-label-container'>"
221
-                . "<label for='{$aField['input_id']}'>"
221
+                . "<label for='{$aField[ 'input_id' ]}'>"
222 222
                     . $aField[ 'before_input' ]
223
-                    . ( $aField['label'] && ! $aField['repeatable']
224
-                        ? "<span class='admin-page-framework-input-label-string' style='min-width:" . $this->sanitizeLength( $aField['label_min_width'] ) . ";'>" . $aField['label'] . "</span>"
223
+                    . ( $aField[ 'label' ] && !$aField[ 'repeatable' ]
224
+                        ? "<span class='admin-page-framework-input-label-string' style='min-width:".$this->sanitizeLength( $aField[ 'label_min_width' ] ).";'>".$aField[ 'label' ]."</span>"
225 225
                         : "" 
226 226
                     )
227
-                    . "<input " . $this->getAttributes( $aField[ 'attributes' ] ) . " />" 
227
+                    . "<input ".$this->getAttributes( $aField[ 'attributes' ] )." />" 
228 228
                     . $aField[ 'after_input' ]
229 229
                     . "<div class='repeatable-field-buttons'></div>" // the repeatable field buttons will be replaced with this element.
230 230
                 . "</label>"
231
-                . "<div class='colorpicker' id='color_{$aField['input_id']}'></div>" // this div element with this class selector becomes a farbtastic color picker. ( below 3.4.x ) // rel='{$aField['input_id']}'
232
-                . $this->_getColorPickerEnablerScript( "{$aField['input_id']}" )
231
+                . "<div class='colorpicker' id='color_{$aField[ 'input_id' ]}'></div>" // this div element with this class selector becomes a farbtastic color picker. ( below 3.4.x ) // rel='{$aField['input_id']}'
232
+                . $this->_getColorPickerEnablerScript( "{$aField[ 'input_id' ]}" )
233 233
             . "</div>"
234
-            . $aField['after_label'];
234
+            . $aField[ 'after_label' ];
235 235
         
236 236
     }
237 237
         /**
@@ -242,13 +242,13 @@  discard block
 block discarded – undo
242 242
         private function _getInputAttributes( array $aField ) {
243 243
                                
244 244
             return array(
245
-                'color'        => $aField['value'],    
246
-                'value'        => $aField['value'],
245
+                'color'        => $aField[ 'value' ],    
246
+                'value'        => $aField[ 'value' ],
247 247
                 'data-default' => isset( $aField[ 'default' ] )
248 248
                     ? $aField[ 'default' ]
249 249
                     : 'transparent', // used by the repeatable script
250 250
                 'type'         => 'text', // it must be text
251
-                'class'        => trim( 'input_color ' . $aField['attributes']['class'] ),
251
+                'class'        => trim( 'input_color '.$aField[ 'attributes' ][ 'class' ] ),
252 252
             ) + $aField[ 'attributes' ];
253 253
             
254 254
         }    
Please login to merge, or discard this patch.
factory/_abstract/form/field_type/AdminPageFramework_FieldType_default.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -37,19 +37,19 @@
 block discarded – undo
37 37
      */
38 38
     public function _replyToGetField( $aField ) {
39 39
         return 
40
-            $aField['before_label']
40
+            $aField[ 'before_label' ]
41 41
             . "<div class='admin-page-framework-input-label-container'>"
42
-                . "<label for='{$aField['input_id']}'>"
43
-                    . $aField['before_input']
44
-                    . ( $aField['label'] && ! $aField['repeatable']
45
-                        ? "<span class='admin-page-framework-input-label-string' style='min-width:" .  $this->sanitizeLength( $aField['label_min_width'] ) . ";'>" . $aField['label'] . "</span>"
42
+                . "<label for='{$aField[ 'input_id' ]}'>"
43
+                    . $aField[ 'before_input' ]
44
+                    . ( $aField[ 'label' ] && !$aField[ 'repeatable' ]
45
+                        ? "<span class='admin-page-framework-input-label-string' style='min-width:".$this->sanitizeLength( $aField[ 'label_min_width' ] ).";'>".$aField[ 'label' ]."</span>"
46 46
                         : "" 
47 47
                     )
48
-                    . $aField['value']
49
-                    . $aField['after_input']
48
+                    . $aField[ 'value' ]
49
+                    . $aField[ 'after_input' ]
50 50
                 . "</label>"
51 51
             . "</div>"
52
-            . $aField['after_label']
52
+            . $aField[ 'after_label' ]
53 53
         ;     
54 54
     }
55 55
 
Please login to merge, or discard this patch.