public function addParamToUrl($string) { $get = Abc::GET(); $addition = $this->router->createGetFrom($string); $param = array_merge($get, $addition); return $this->createUrl($param, $abs = false); }
/** * Активация ссылок * * @param string $return * @param string|array $param * @param mix $default * * @return string */ function activeLink($query, $default = false) { $get = Abc::GET(); $current = Abc::getService('Url')->getGet($query); if ($get === $current) { return 'class="act"'; } if (null === $get['controller'] && $default) { return 'class="act"'; } return null; }
/** * Строит сервис. * * @param bool $global * * @return void */ protected function buildService($global = false) { $component = '\\ABC\\Abc\\Components\\' . $this->service . '\\' . $this->service; $typeService = $global ? 'setGlobal' : 'set'; $get = Abc::GET(); $url = Abc::getService('Url'); $this->locator->{$typeService}($this->service, function () use($component, $get, $url) { $obj = new $component(); $obj->get = $get; $obj->url = $url; return $obj; }); }