nattreid/bing-api

Bing Api for Nette Framework

1.1.2 2018-05-28 09:41 UTC

This package is auto-updated.

Last update: 2024-12-09 00:33:55 UTC


README

Nastavení v config.neon

extensions:
    bingApi: NAttreid\BingApi\DI\BingApiExtension

bingApi:
    tagId: 12345

Použití

/** @var NAttreid\BingApi\IBingApiFactory @inject */
public $bingApiFactory;

protected function createComponentBingApi() {
    return $this->bingApiFactory->create();
}

public function renderDefault() {
    $this['bingApi']->conversion(500, 'EUR'); // konverze
}

v @layout.latte

<html>
<head>
    {control bingApi:head}
</head>
<body>
    <!-- html kod -->
    {control bingApi}
</body>
</html>