private function _prepareInputHtml($id, $name, $settings, $value, $static = false)
{
$locale = $this->element->locale;
$blockTypeInfo = [];
foreach ($settings->getBlockTypes() as $blockType) {
$fieldLayout = $blockType->getFieldLayout();
$blockTypeInfo[] = ['id' => $blockType->id, 'fieldLayoutId' => $fieldLayout->id, 'sortOrder' => $blockType->sortOrder, 'handle' => $blockType->handle, 'name' => Craft::t($blockType->name), 'maxBlocks' => $blockType->maxBlocks, 'childBlocks' => $blockType->childBlocks, 'topLevel' => (bool) $blockType->topLevel, 'tabs' => craft()->neo->renderBlockTabs($blockType, null, $name, $static, $locale)];
}
$groupInfo = [];
foreach ($settings->getGroups() as $group) {
$groupInfo[] = ['sortOrder' => $group->sortOrder, 'name' => $group->name];
}
$blockInfo = [];
$sortOrder = 0;
foreach ($value as $block) {
$blockType = $block->getType();
$blockInfo[] = ['id' => $block->id, 'blockType' => $blockType->handle, 'modified' => $block->modified, 'sortOrder' => $sortOrder++, 'collapsed' => (bool) $block->collapsed, 'enabled' => (bool) $block->enabled, 'level' => intval($block->level) - 1, 'tabs' => craft()->neo->renderBlockTabs($blockType, $block, $name, $static)];
}
$this->_includeResources('input', ['namespace' => craft()->templates->namespaceInputName($name), 'blockTypes' => $blockTypeInfo, 'groups' => $groupInfo, 'inputId' => craft()->templates->namespaceInputId($id), 'maxBlocks' => $settings->maxBlocks, 'blocks' => $blockInfo, 'static' => $static]);
craft()->templates->includeTranslations("Select", "Actions", "Add a block", "Add block above", "Duplicate block", "Are you sure you want to delete the selected blocks?", "Expand", "Collapse", "Enable", "Disable", "Disabled", "Delete", "Are you sure you want to delete the selected blocks?", "Reorder");
}