For example: Users. You can only have one fieldlayout per ElementType user which you customize in the settings section.
I've got as far as abstracting out the fieldlayout to it's own view, but when I go to set the field layout in the controller I'm borrowing the following code:
// Set the field layout $fieldLayout = craft()->fields->assembleLayoutFromPost(false); $fieldLayout->type = ElementType::MyElementType;
To which I get the following (pretty much expected) error:
Fatal error: Undefined class constant 'MyElementType' in /controllers/MyElementTypeController.php on line 115
I've looked at how the plugin example "Events" is handling this and Brandon seems to be setting the fieldlayout->type to Assets:
$fieldLayout = craft()->fields->assembleLayoutFromPost(); $fieldLayout->type = ElementType::Asset; $calendar->setFieldLayout($fieldLayout);
Is this how we're supposed to be setting these up? i.e., borrowing from other elementtypes?