/** * Handle the command. * * @param Decorator $decorator * @return LinkCollection */ public function handle(Decorator $decorator) { $links = $this->group->getLinks(); $this->dispatch(new SetCurrentLink($links)); $this->dispatch(new SetActiveLinks($links)); return $decorator->decorate($links); }
/** * Handle the command. * * @param LinkRepositoryInterface $links */ public function handle(LinkRepositoryInterface $links) { foreach ($this->group->getLinks() as $link) { $links->delete($link); } }