protected function getVisibleStructureForEditor( Editor $editor, $showPropertyColumn, array &$suffixAttributes ) { $leadingAttributes = array(); $childEditors = $editor->getEditors(); for ( $i = $showPropertyColumn ? 0 : 1; $i < 2; $i++ ) { $leadingAttributes[] = $childEditors[$i]->getAttribute(); } return new Structure( array_merge( $leadingAttributes, $suffixAttributes ) ); }
function getStructureAsAddCells( IdStack $idPath, Editor $editor, &$startColumn = 0 ) { $result = ''; foreach ( $editor->getEditors() as $childEditor ) { $attribute = $childEditor->getAttribute(); $type = $attribute->type; $idPath->pushAttribute( $attribute ); if ( $childEditor instanceof RecordTableCellEditor ) $result .= $this->getStructureAsAddCells( $idPath, $childEditor, $startColumn ); else { if ( $childEditor->showEditField( $idPath ) ) $result .= '<td class="' . getHTMLClassForType( $type, $attribute ) . ' column-' . parityClass( $startColumn ) . '">' . $childEditor->add( $idPath ) . '</td>'; $startColumn++; } $idPath->popAttribute(); } return $result; }