<?php
 namespace Module\Doc\Api\Controller; use Illuminate\Routing\Controller; use ModStart\Core\Input\Response; use ModStart\Module\ModuleManager; use Module\Doc\Type\DocType; use Module\Member\Support\MemberLoginCheck; class DocTypeController extends Controller implements MemberLoginCheck { public function listEnables() { $enables = []; $enables[] = DocType::MARKDOWN; if (ModuleManager::isModuleInstalled('DocGraph')) { $enables[] = DocType::GRAPH; } if (ModuleManager::isModuleInstalled('DocMind')) { $enables[] = DocType::MIND; } if (ModuleManager::isModuleInstalled('DocRich')) { $enables[] = DocType::RICH; } return Response::generateSuccessData($enables); } }