webservice = $webservice; $this->remoteClientCreateUrl = $remoteClientCreateUrl; } /** * @return array */ public function getFunctions() { return array( new \Twig_SimpleFunction('remote_client', array($this, 'getClient')), new \Twig_SimpleFunction('remote_client_url', array($this, 'getClientCreateUrl')), ); } /** * @param int $clientId * * @return string */ public function getClient($clientId) { return $this->webservice->getById('client', $clientId); } /** * @return string */ public function getClientCreateUrl() { return $this->remoteClientCreateUrl; } /** * @return string */ public function getName() { return 'remote_client_extension'; } }