public function getHasAttributes() { if ($attributes = $this->getViewState('Attributes', null)) { return $attributes->getCount() > 0; } else { return false; } }