public function has_attributes() { foreach ($this->get_attributes() as $attribute) { if ($attribute->get_visible()) { return true; } } return false; }