本文整理匯總了PHP中Editor::getEditors方法的典型用法代碼示例。如果您正苦於以下問題:PHP Editor::getEditors方法的具體用法?PHP Editor::getEditors怎麽用?PHP Editor::getEditors使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Editor
的用法示例。
在下文中一共展示了Editor::getEditors方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getVisibleStructureForEditor
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 ) );
}
示例2: getStructureAsAddCells
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;
}