本文整理汇总了PHP中TreeDropdownField::Create方法的典型用法代码示例。如果您正苦于以下问题:PHP TreeDropdownField::Create方法的具体用法?PHP TreeDropdownField::Create怎么用?PHP TreeDropdownField::Create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TreeDropdownField
的用法示例。
在下文中一共展示了TreeDropdownField::Create方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCMSFields
public function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->add($MenuRootField = DropdownField::Create('MenuRoot', 'Menu Root', singleton('SidebarMenuWidget')->dbObject('MenuRoot')->enumValues()));
$MenuRootField->setDescription("Select from where the menu starts.<br/>\n <strong>Root</strong>: Show the entire page tree.<br/>\n <strong>Selected Page</strong>: Show the children of a specific page.<br/>\n <strong>Current Page</strong>: Show the children of the page currently being viewed.<br/>\n <strong>Root of Current Page</strong>: Show children of the current pages top most page.<br/>");
$fields->add($ShowAllField = CheckboxField::Create('ShowAll', 'Show All'));
$ShowAllField->setDescription("Show all pages, even those who are marked as not to show in menus");
$fields->add($RootPageField = TreeDropdownField::Create("RootPageID", "Root Page", "SiteTree")->setDescription("If <strong>MenuRoot</strong> is set to "Selected Page" set which page to start the menu from"));
$RootPageField->displayIf("MenuRoot")->isEqualTo("Selected Page");
$fields->changeFieldOrder(array("WidgetName", "WidgetLabel", "Enabled", "MenuRoot", "RootPageID", "ShowAll"));
return $fields;
}