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