本文整理汇总了PHP中FormItem::FormCategorySections方法的典型用法代码示例。如果您正苦于以下问题:PHP FormItem::FormCategorySections方法的具体用法?PHP FormItem::FormCategorySections怎么用?PHP FormItem::FormCategorySections使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormItem
的用法示例。
在下文中一共展示了FormItem::FormCategorySections方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCMSFields
function getCMSFields()
{
// Get the parent CMS fields
$oFields = parent::getCMSFields();
// Add some fields
$oFields->addFieldToTab('Root.Content.FormMessages', new HtmlEditorField('Success', 'Success Message', 3, ""));
$oFields->addFieldToTab('Root.Content.FormMessages', new HtmlEditorField('Failure', 'Failure Message', 3, ""));
//Add Rubbish Collection FormCategorys
$oCategories = new DataObjectManager($this, 'FormCategorys', 'FormCategory', array('Title' => 'Title', 'Description' => 'Description'), 'getCMSFields_forPopup');
// Set the Filter
$oFields->addFieldToTab("Root.Content.FormCategories", $oCategories);
//Add Rubbish Collection Category -> FormItems
$oItems = new DataObjectManager($this, 'FormItems', 'FormItem', array('FormCategory.Title' => 'Form Category', 'Title' => 'Title', 'Description' => 'Description'), 'getCMSFields_forPopup');
$oFields->addFieldToTab("Root.Content.FormItems", $oItems);
// Set the Filter
$oItems->setFilter('FormCategoryID', 'Filter by FormCategorys', FormItem::FormCategorySections());
//Add DataSheets
$oDataSheets = new DataObjectManager($this, 'DataSheets', 'DataSheet', array('Participants' => 'Total Participants', 'EstVolume' => 'Estimated Volume', 'Image' => 'Image'), 'getCMSFields_forPopup');
$oFields->addFieldToTab("Root.Content.DataSheets", $oDataSheets);
// Return the fields
return $oFields;
}