false, 'autofocus' => false, 'required' => false, ], $config ); // Parent constructor parent::__construct( $config ); if ( $config['rows'] ?? null ) { $this->input->setAttributes( [ 'rows' => $config['rows'] ] ); } } /** @inheritDoc */ protected function getInputElement( $config ) { return new Tag( 'textarea' ); } /** @inheritDoc */ public function getConfig( &$config ) { $rows = $this->input->getAttribute( 'rows' ); if ( $rows !== null ) { $config['rows'] = $rows; } return parent::getConfig( $config ); } }