/** * Annotated Controllers and Extensions */ public function afterCallActionHandler() { $this->setUp(); $skipAnnotation = $this->owner->getRequest()->getVar('skipannotation'); $envIsAllowed = $this->permissionChecker->environmentIsAllowed(); if ($skipAnnotation === null && $envIsAllowed) { $this->displayMessage(' Generating class docblocks'); $modules = $this->permissionChecker->enabledModules(); foreach ($modules as $module) { $this->annotator->annotateModule($module); } $this->displayMessage(' Docblock generation finished!'); } }
/** * @param string $className * * Generate docblock for a single subclass of DataObject or DataExtenions * * @return bool */ public function annotateObject($className) { if (!$this->permissionChecker->classNameIsAllowed($className)) { return false; } $this->writeFileContent($className); return true; }