for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Faulancer\Form\Type\Base;
use Faulancer\Form\Type\AbstractType;
/**
* Class File
* @package Faulancer\Form\Type\Base
* @author Florian Knapp <[email protected]>
*/
class File extends AbstractType
{
/** @var string */
protected $inputType = 'input';
protected $element = '';
* @return self
public function create()
parent::create();
$output = '<' . $this->inputType . ' ';
foreach ($this->definition['attributes'] as $attr => $value) {
if (!empty($this->getValue()) && $attr === 'value') {
continue;
}
$output .= $attr . '="' . $value . '" ';
$output .= '/>';
$this->element = $output;
return $this;