Example #1
0
 /**
  * setCommonAttributes
  *
  * @param array $attrs Field attributes to prepare
  *
  * @return array
  */
 protected function setCommonAttributes(array $attrs)
 {
     $result = parent::setCommonAttributes($attrs);
     $result['value'] = strlen($result['value']) ? str_repeat(chr(static::PLACEHOLDER_SIGN), static::PLACEHOLDER_LENGTH) : '';
     return $result;
 }
Example #2
0
 /**
  * Prepare attributes
  *
  * @param array $attrs Field attributes to prepare
  *
  * @return array
  */
 protected function prepareAttributes(array $attrs)
 {
     $attrs = parent::prepareAttributes($attrs);
     $attrs['class'] = (empty($attrs['class']) ? '' : $attrs['class'] . ' ') . 'password-visible';
     return $attrs;
 }
Example #3
0
 /**
  * setCommonAttributes
  *
  * @param array $attrs Field attributes to prepare
  *
  * @return void
  */
 protected function setCommonAttributes(array $attrs)
 {
     $result = parent::setCommonAttributes($attrs);
     $result['value'] = '';
     return $result;
 }