You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
446 B
23 lines
446 B
<?php |
|
/** |
|
* Created by Error202 |
|
* Date: 27.07.2018 |
|
*/ |
|
|
|
namespace common\modules\pages\entities\queries; |
|
|
|
use common\modules\pages\entities\Page; |
|
use yii\db\ActiveQuery; |
|
use core\components\LanguageTranslateTrait; |
|
|
|
class PageQuery extends ActiveQuery |
|
{ |
|
use LanguageTranslateTrait; |
|
|
|
public function typePublic($alias = null): PageQuery |
|
{ |
|
return $this->andWhere([ |
|
($alias ? $alias . '.' : '') . 'type' => Page::TYPE_PUBLIC, |
|
]); |
|
} |
|
}
|
|
|