function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('maxlength' => $this->getMaxLength(), 'size' => $this->getMaxLength() ? min($this->getMaxLength(), 30) : null));
 }