public function hasSubsidiary($name)
    {
        $class = $this->getSubsidiaryClass($name);
        if (empty($class)) {
            return false;
        }
        $query = $class::find();
        if (!method_exists($query, 'createdBy')) {
            return false;
        }
        return $query->createdBy($this)->exists();
    }
public function hasSubsidiary($name)
    {
        $class = $this->getSubsidiaryClass($name);
        if (empty($class)) {
            return false;
        }
        $query = $class::find();
        if (!method_exists($query, 'createdBy')) {
            return false;
        }
        return $query->createdBy($this)->exists();
    }
public function hasSubsidiary ( $ name ) { $ class = $ this -> getSubsidiaryClass ( $ name ) ; if ( empty ( $ class ) ) { return false ; } $ query = $ class :: find ( ) ; if ( ! method_exists ( $ query , 'createdBy' ) ) { return false ; } return $ query -> createdBy ( $ this ) -> exists ( ) ; }
Check whether the user has a subsidiary model.
@param $name Subsidiary name, case insensitive.
@return bool
Check whether the user has a subsidiary model .