Go to the source code of this file.
Namespaces | |
namespace | TYPO3 |
Classes | |
class | SC_wizard_table |
Functions | |
changeFunc () | |
Detects if a control button (up/down/around/delete) has been pressed for an item and accordingly it will manipulate the internal TABLECFG array. | |
cfgArray2CfgString ($cfgArr) | |
Converts the input array to a configuration code string. | |
cfgString2CfgArray ($cfgStr, $cols) | |
Converts the input configuration code string into an array. | |
Variables | |
$BACK_PATH = '' | |
[CLASS/FUNCTION INDEX of SCRIPT] | |
$cells = array() | |
$firstRow = current($cfgArr) | |
$a | |
$tRows [] | |
$content = '' | |
$SOBE = t3lib_div::makeInstance('SC_wizard_table') |
|
Converts the input array to a configuration code string.
Definition at line 554 of file wizard_table.php. Referenced by SC_wizard_table::getConfigCode(), and SC_wizard_forms::getConfigCode(). 00554 { 00555 00556 // Initialize: 00557 $inLines=array(); 00558 00559 // Traverse the elements of the table wizard and transform the settings into configuration code. 00560 reset($this->TABLECFG['c']); 00561 while(list($a)=each($this->TABLECFG['c'])) { 00562 $thisLine=array(); 00563 reset($this->TABLECFG['c'][$a]); 00564 while(list($b)=each($this->TABLECFG['c'][$a])) { 00565 $thisLine[]=str_replace('|','',$this->TABLECFG['c'][$a][$b]); 00566 } 00567 $inLines[]=implode('|',$thisLine); 00568 } 00569 00570 // Finally, implode the lines into a string: 00571 $bodyText = implode(chr(10),$inLines); 00572 00573 // Return the configuration code: 00574 return $bodyText; 00575 }
|
|
Converts the input configuration code string into an array.
Definition at line 585 of file wizard_table.php. References $a. Referenced by SC_wizard_table::getConfigCode(), and SC_wizard_forms::getConfigCode(). 00585 { 00586 00587 // Explode lines in the configuration code - each line is a table row. 00588 $tLines=explode(chr(10),$cfgStr); 00589 00590 // Setting number of columns 00591 if (!$cols && trim($tLines[0])) { // auto... 00592 $cols = count(explode('|',$tLines[0])); 00593 } 00594 $cols=$cols?$cols:4; 00595 00596 // Traverse the number of table elements: 00597 $cfgArr=array(); 00598 foreach($tLines as $k => $v) { 00599 00600 // Initialize: 00601 $vParts = explode('|',$v); 00602 00603 // Traverse columns: 00604 for ($a=0;$a<$cols;$a++) { 00605 $cfgArr[$k][$a]=$vParts[$a]; 00606 } 00607 } 00608 00609 // Return configuration array: 00610 return $cfgArr; 00611 }
|
|
Detects if a control button (up/down/around/delete) has been pressed for an item and accordingly it will manipulate the internal TABLECFG array.
Definition at line 438 of file wizard_table.php. 00438 { 00439 if ($this->TABLECFG['col_remove']) { 00440 $kk = key($this->TABLECFG['col_remove']); 00441 $cmd='col_remove'; 00442 } elseif ($this->TABLECFG['col_add']) { 00443 $kk = key($this->TABLECFG['col_add']); 00444 $cmd='col_add'; 00445 } elseif ($this->TABLECFG['col_start']) { 00446 $kk = key($this->TABLECFG['col_start']); 00447 $cmd='col_start'; 00448 } elseif ($this->TABLECFG['col_end']) { 00449 $kk = key($this->TABLECFG['col_end']); 00450 $cmd='col_end'; 00451 } elseif ($this->TABLECFG['col_left']) { 00452 $kk = key($this->TABLECFG['col_left']); 00453 $cmd='col_left'; 00454 } elseif ($this->TABLECFG['col_right']) { 00455 $kk = key($this->TABLECFG['col_right']); 00456 $cmd='col_right'; 00457 } elseif ($this->TABLECFG['row_remove']) { 00458 $kk = key($this->TABLECFG['row_remove']); 00459 $cmd='row_remove'; 00460 } elseif ($this->TABLECFG['row_add']) { 00461 $kk = key($this->TABLECFG['row_add']); 00462 $cmd='row_add'; 00463 } elseif ($this->TABLECFG['row_top']) { 00464 $kk = key($this->TABLECFG['row_top']); 00465 $cmd='row_top'; 00466 } elseif ($this->TABLECFG['row_bottom']) { 00467 $kk = key($this->TABLECFG['row_bottom']); 00468 $cmd='row_bottom'; 00469 } elseif ($this->TABLECFG['row_up']) { 00470 $kk = key($this->TABLECFG['row_up']); 00471 $cmd='row_up'; 00472 } elseif ($this->TABLECFG['row_down']) { 00473 $kk = key($this->TABLECFG['row_down']); 00474 $cmd='row_down'; 00475 } 00476 00477 if ($cmd && t3lib_div::testInt($kk)) { 00478 if (substr($cmd,0,4)=='row_') { 00479 switch($cmd) { 00480 case 'row_remove': 00481 unset($this->TABLECFG['c'][$kk]); 00482 break; 00483 case 'row_add': 00484 $this->TABLECFG['c'][$kk+1]=array(); 00485 break; 00486 case 'row_top': 00487 $this->TABLECFG['c'][1]=$this->TABLECFG['c'][$kk]; 00488 unset($this->TABLECFG['c'][$kk]); 00489 break; 00490 case 'row_bottom': 00491 $this->TABLECFG['c'][10000000]=$this->TABLECFG['c'][$kk]; 00492 unset($this->TABLECFG['c'][$kk]); 00493 break; 00494 case 'row_up': 00495 $this->TABLECFG['c'][$kk-3]=$this->TABLECFG['c'][$kk]; 00496 unset($this->TABLECFG['c'][$kk]); 00497 break; 00498 case 'row_down': 00499 $this->TABLECFG['c'][$kk+3]=$this->TABLECFG['c'][$kk]; 00500 unset($this->TABLECFG['c'][$kk]); 00501 break; 00502 } 00503 ksort($this->TABLECFG['c']); 00504 } 00505 if (substr($cmd,0,4)=='col_') { 00506 reset($this->TABLECFG['c']); 00507 while(list($cAK)=each($this->TABLECFG['c'])) { 00508 switch($cmd) { 00509 case 'col_remove': 00510 unset($this->TABLECFG['c'][$cAK][$kk]); 00511 break; 00512 case 'col_add': 00513 $this->TABLECFG['c'][$cAK][$kk+1]=''; 00514 break; 00515 case 'col_start': 00516 $this->TABLECFG['c'][$cAK][1]=$this->TABLECFG['c'][$cAK][$kk]; 00517 unset($this->TABLECFG['c'][$cAK][$kk]); 00518 break; 00519 case 'col_end': 00520 $this->TABLECFG['c'][$cAK][1000000]=$this->TABLECFG['c'][$cAK][$kk]; 00521 unset($this->TABLECFG['c'][$cAK][$kk]); 00522 break; 00523 case 'col_left': 00524 $this->TABLECFG['c'][$cAK][$kk-3]=$this->TABLECFG['c'][$cAK][$kk]; 00525 unset($this->TABLECFG['c'][$cAK][$kk]); 00526 break; 00527 case 'col_right': 00528 $this->TABLECFG['c'][$cAK][$kk+3]=$this->TABLECFG['c'][$cAK][$kk]; 00529 unset($this->TABLECFG['c'][$cAK][$kk]); 00530 break; 00531 } 00532 ksort($this->TABLECFG['c'][$cAK]); 00533 } 00534 } 00535 } 00536 00537 // Convert line breaks to <br /> tags: 00538 reset($this->TABLECFG['c']); 00539 while(list($a)=each($this->TABLECFG['c'])) { 00540 reset($this->TABLECFG['c'][$a]); 00541 while(list($b)=each($this->TABLECFG['c'][$a])) { 00542 $this->TABLECFG['c'][$a][$b] = str_replace(chr(10),'<br />',str_replace(chr(13),'',$this->TABLECFG['c'][$a][$b])); 00543 } 00544 } 00545 }
|
|
|
[CLASS/FUNCTION INDEX of SCRIPT] 84: class SC_wizard_table 112: function init() 153: function main() 169: function printContent() 178: function tableWizard() SECTION: Helper functions 217: function getConfigCode($row) 282: function getTableHTML($cfgArr,$row) 438: function changeFunc() 554: function cfgArray2CfgString($cfgArr) 585: function cfgString2CfgArray($cfgStr,$cols) TOTAL FUNCTIONS: 9 (This index is automatically created/updated by the extension "extdeveval") Definition at line 62 of file wizard_table.php. |
|
Definition at line 366 of file wizard_table.php. Referenced by SC_mod_tools_em_index::extensionListRow(), SC_mod_tools_em_index::extensionListRowHeader(), SC_wizard_forms::getFormHTML(), SC_wizard_table::getTableHTML(), SC_mod_web_perm_index::notEdit(), and tslib_pibase::pi_list_modeSelector(). |
|
Definition at line 429 of file wizard_table.php. |
|
Definition at line 344 of file wizard_table.php. |
|
Definition at line 631 of file wizard_table.php. |
|
Initial value: ' <tr class="bgColor5"> <td align="center">'.implode('</td> <td align="center">',$cells).'</td> </tr>' Definition at line 371 of file wizard_table.php. Referenced by SC_wizard_colorpicker::colorMatrix(), t3lib_sqlengine::debug_printResultSet(), SC_wizard_forms::getFormHTML(), getSingleField_typeFlex(), getSingleField_typeFlex_sheetMenu(), getSingleField_typeSelect_checkbox(), SC_wizard_table::getTableHTML(), tslib_pibase::pi_list_makelist(), and SC_db_new::regularNew(). |