/** * handle * * @param \Docit\Core\Project $project */ public function handle(Project $project, Menu $menu) { if (!$project->config('enable_phpdoc_hook', false)) { return; } $node = $menu->add('phpdoc', $project->config('phpdoc_hook_settings.menu_name')); $node->setMeta('icon', $project->config('phpdoc_hook_settings.menu_icon')); $node->setAttribute('href', route('docit.phpdoc', ['projectName' => $project->getName(), 'ref' => $project->getRef()])); }
/** * Get the url to this document * * @return string */ public function url() { return $this->docit->url($this->project, $this->project->getRef(), $this->pathName); }