Exemplo n.º 1
0
 public function behaviors()
 {
     return ['access' => ['class' => AccessControl::className(), 'rules' => [['allow' => true, 'actions' => ['get-robots'], 'roles' => ['?']], ['allow' => true, 'actions' => ['flush-meta-cache', 'flush-counter-cache', 'flush-robots-cache'], 'roles' => ['cache manage']], ['allow' => false, 'actions' => ['flush-meta-cache', 'flush-counter-cache', 'flush-robots-cache']], ['allow' => true, 'roles' => ['seo manage']]]], ['class' => 'yii\\filters\\PageCache', 'only' => ['GetRobots'], 'duration' => 24 * 60 * 60, 'dependency' => ActiveRecordHelper::getCommonTag(Config::className())]];
 }