public function getByUrl($url = null) { $this->getDbCriteria()->mergeWith(['condition' => $this->getTableAlias() . '.slug = :slug', 'params' => [':slug' => $url]]); return $this; }