What is function behaviors in SiteController.php ?

I am starting up with yii2

I dont have any idea of previous version of YII

But I have good knowledge of codeigniter and have been working in codeigniter from last 3 years.

MY Question is as below :

There is a function name behaviors() in SiteController.php file.

It has below code. I want to knwow what does it do?

public function behaviors()

{


    return [


        'access' => [


            'class' => AccessControl::className(),


            'only' => ['logout'],


            'rules' => [


                [


                    'actions' => ['logout'],


                    'allow' => true,


                    'roles' => ['@'],


                ],


            ],


        ],


        'verbs' => [


            'class' => VerbFilter::className(),


            'actions' => [


                'logout' => ['post'],


            ],


        ],


    ];


}

http://www.yiiframework.com/doc-2.0/guide-concept-behaviors.html