store\components\behaviors\DCategoryTreeBehavior::getChildByAlias PHP Method

getChildByAlias() protected method

protected getChildByAlias ( $alias, null $criteria = null ) : mixed
$alias
$criteria null
return mixed
    protected function getChildByAlias($alias, $criteria = null)
    {
        if ($criteria === null) {
            $criteria = $this->getOwnerCriteria();
        }
        $criteria->mergeWith(['condition' => 't.' . $this->aliasAttribute . '=:alias AND t.' . $this->parentAttribute . '=:parent_id', 'params' => [':alias' => $alias, ':parent_id' => $this->getOwner()->getPrimaryKey()]]);
        return $this->cached($this->getOwner())->find($criteria);
    }