private function _getLayouts()
{
$assetSources = craft()->assetSources->getAllSources();
$categoryGroups = craft()->categories->getAllGroups();
$globalSets = craft()->globals->getAllSets();
$entryTypes = EntryTypeModel::populateModels(EntryTypeRecord::model()->ordered()->findAll());
$tagGroups = craft()->tags->getAllTagGroups();
//$userFields = FieldLayoutModel::populateModel(FieldLayoutRecord::model()->findByAttributes('type', ElementType::User));
$sections = craft()->sections->getAllSections();
$singleSections = array();
foreach ($sections as $section) {
$entryType = $section->getEntryTypes()[0];
$singleSections[$section->id] = (int) $entryType->fieldLayoutId;
}
return array('assetSource' => $this->_mapLayouts($assetSources), 'categoryGroup' => $this->_mapLayouts($categoryGroups), 'globalSet' => $this->_mapLayouts($globalSets), 'entryType' => $this->_mapLayouts($entryTypes), 'tagGroup' => $this->_mapLayouts($tagGroups), 'singleSection' => $singleSections);
}