galek/crawler-detect

Extension of jaybizzle/crawler-detect for Nette framework.

v1.0.0 2018-04-10 08:22 UTC

README

Scrutinizer Code Quality Total Downloads Latest Stable Version License Monthly Downloads composer.lock

Package Installation

The best way to install Nette Calendar is using Composer:

$ composer require galek/nette-calendar

Packagist - Versions

Usage

config.neon

extensions: 
    crawlerDetect: Galek\CrawlerDetect\DI\CrawlerDetectExtension

presenter

class HomepagePresenter {

    /**
     * @var Galek\CrawlerDetect\CrawlerDetect @inject
     */
    public $crawlerDetect;
    ...
    
    public function actionDefault()
    {
        ...
        if ($this->crawlerDetect->isCrawler()) {
            ...
        }
        ...
    }
}