void HTML_Menu_DirectRenderer::setEntryTemplate (
mixed $type
, string $template
= = null
)
テンプレートには、最低ひとつの {title} プレースホルダが必須です。 また、エントリの型によっては {url} プレースホルダおよび {indent} プレースホルダを指定することも可能です。 デフォルトのテンプレートは次のようになります。
<?php
array(
HTML_MENU_ENTRY_INACTIVE => '<td>{indent}<a href="{url}">{title}</a></td>',
HTML_MENU_ENTRY_ACTIVE => '<td>{indent}<b>{title}</b></td>',
HTML_MENU_ENTRY_ACTIVEPATH => '<td>{indent}<b><a href="{url}">{title}</a></b></td>',
HTML_MENU_ENTRY_PREVIOUS => '<td><a href="{url}"><< {title}</a></td>',
HTML_MENU_ENTRY_NEXT => '<td><a href="{url}">{title} >></a></td>',
HTML_MENU_ENTRY_UPPER => '<td><a href="{url}">^ {title} ^</a></td>',
HTML_MENU_ENTRY_BREADCRUMB => '<td><a href="{url}">{title}</a> >> </td>'
);
?>
$type
型 (HTML_MENU_ENTRY_* 定数 のいずれか) あるいは 'type' => 'template' 形式の配列。
$template
$type が配列でない場合の、このエントリ型のテンプレート。
例外はスローされません。
This function can not be called statically.
Prev | HTML_Menu | Next |
HTML_Menu_DirectRenderer クラス概要 | PEAR Manual | DirectRenderer::setMenuTemplate() |