public function hasAttribute($name) { if ($attributes = $this->getViewState('Attributes', null)) { return $attributes->contains($name); } else { return false; } }