/** * Override the parent implementation. If the Title property is * define, add the "title" attribute using the Title property. * @return array attributes array. */ function getAttributesToRender() { $attributes = parent::getAttributesToRender(); $title = $this->getTitle(); if (!empty($title)) { $attributes['title'] = $title; } return $attributes; }