本文整理匯總了PHP中eZTemplateNodeTool::createErrorNode方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZTemplateNodeTool::createErrorNode方法的具體用法?PHP eZTemplateNodeTool::createErrorNode怎麽用?PHP eZTemplateNodeTool::createErrorNode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eZTemplateNodeTool
的用法示例。
在下文中一共展示了eZTemplateNodeTool::createErrorNode方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: resourceAcquisitionTransformation
//.........這裏部分代碼省略.........
}
}
if ( count( $matchLookupArray ) > 0 )
{
$newNodes = array_merge( $newNodes, $accessNodes );
$accessNodes = array();
// If $matchFile is an array we cannot create a transformation for this entry
if ( is_array( $matchLookupArray ) )
return false;
$newNodes[] = eZTemplateNodeTool::createResourceAcquisitionNode( '',
$matchLookupArray, false,
eZTemplate::RESOURCE_FETCH, false,
$node[4], array( 'spacing' => $spacing ),
$rule['namespace'], 'attributeAccess' );
if ( $hasAcquisitionNodes )
{
$newNodes[] = eZTemplateNodeTool::createCodePieceNode( "else " . ( $resourceData['use-comments'] ? ( "/*OF:" . __LINE__ . "*/" ) : "" ) . "\n{", array( 'spacing' => $spacing ) );
$newNodes[] = eZTemplateNodeTool::createSpacingIncreaseNode();
}
}
if ( $hasAcquisitionNodes )
{
$newNodes = array_merge( $newNodes, $accessNodes, $acquisitionNodes );
if ( $attributeAccessCount > 0 )
{
$newNodes[] = eZTemplateNodeTool::createCodePieceNode( "}", array( 'spacing' => $acquisitionSpacing ) );
}
++$attributeAccessCount;
}
else if ( count( $matchLookupArray ) == 0 )
{
$newNodes[] = eZTemplateNodeTool::createErrorNode( "Failed to load template",
$functionName,
eZTemplateNodeTool::extractFunctionNodePlacement( $node ),
array( 'spacing' => $acquisitionSpacing ) );
}
if ( count( $matchLookupArray ) > 0 and $hasAcquisitionNodes )
{
$newNodes[] = eZTemplateNodeTool::createSpacingDecreaseNode();
$newNodes[] = eZTemplateNodeTool::createCodePieceNode( "}", array( 'spacing' => $spacing ) );
}
}
}
if ( $viewFileMatch !== null )
{
$mainSpacing = 0;
if ( $hasAttributeAccess )
{
$newNodes[] = eZTemplateNodeTool::createCodePieceNode( "else " . ( $resourceData['use-comments'] ? ( "/*OF:" . __LINE__ . "*/" ) : "" ) . "\n{\n", array( 'spacing' => $acquisitionSpacing ) );
$mainSpacing = 4;
}
$templateCounter = 0;
$addFileResource = true;
if ( isset( $viewFileMatch['custom_match'] ) )
{
$spacing = $mainSpacing + 4;
$matchCount = 0;
foreach ( $viewFileMatch['custom_match'] as $customMatch )
{
$matchConditionCount = count( $customMatch['conditions'] );
$code = '';
if ( $matchCount > 0 )