本文整理汇总了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 )