Code:
if (!isset($this->brands)) {
$this->brands = getBrands();
}
Please check the var/log/ directory. I believe you should find a lot of "function getBrands() is not found" errors there.
Do you want to call the getBrands() method from the original class? If so, it should be "$this->getBrands()".