public function actionPhrase()
    {
        $this->stdout('phraseLiveTime: ' . \Yii::$app->cmsSearch->phraseLiveTime . "\n");

        if (\Yii::$app->cmsSearch->phraseLiveTime) {
            $deleted = CmsSearchPhrase::deleteAll([
                '<=',
                'created_at',
                \Yii::$app->formatter->asTimestamp(time()) - (int)\Yii::$app->cmsSearch->phraseLiveTime
            ]);

            $message = \Yii::t('skeeks/search', 'Removing searches') . " :" . $deleted;
            \Yii::info($message, 'skeeks/search');
            $this->stdout("\t" . $message . "\n");
        }
    }
public function actionPhrase()
    {
        $this->stdout('phraseLiveTime: ' . \Yii::$app->cmsSearch->phraseLiveTime . "\n");

        if (\Yii::$app->cmsSearch->phraseLiveTime) {
            $deleted = CmsSearchPhrase::deleteAll([
                '<=',
                'created_at',
                \Yii::$app->formatter->asTimestamp(time()) - (int)\Yii::$app->cmsSearch->phraseLiveTime
            ]);

            $message = \Yii::t('skeeks/search', 'Removing searches') . " :" . $deleted;
            \Yii::info($message, 'skeeks/search');
            $this->stdout("\t" . $message . "\n");
        }
    }
public function actionPhrase ( ) { $ this -> stdout ( 'phraseLiveTime: ' . \ Yii :: $ app -> cmsSearch -> phraseLiveTime . "\n" ) ; if ( \ Yii :: $ app -> cmsSearch -> phraseLiveTime ) { $ deleted = CmsSearchPhrase :: deleteAll ( [ '<=' , 'created_at' , \ Yii :: $ app -> formatter -> asTimestamp ( time ( ) ) - ( int ) \ Yii :: $ app -> cmsSearch -> phraseLiveTime ] ) ; $ message = \ Yii :: t ( 'skeeks/search' , 'Removing searches' ) . " :" . $ deleted ; \ Yii :: info ( $ message , 'skeeks/search' ) ; $ this -> stdout ( "\t" . $ message . "\n" ) ; } }
Remove old searches
Remove old searches