method __construct documentation in bbn\Html\Form

This will call the initial build for a new instance. It should be called only once from within the script. All subsequent calls to controllers should be done through $this->add($path).

function($cfg) { if ( $cfg ){ if (\is_string($cfg) ){ $cfg = [ 'tag' => 'form', 'attr' => [ 'action' => $cfg, 'method' => 'post' ] ]; } else{ $cfg['tag'] = 'form'; if ( !isset($cfg['attr']) ){ $cfg['attr'] = []; } if ( !isset($cfg['attr']['action']) ){ $cfg['attr']['action'] = '.'; } if ( !isset($cfg['attr']['method']) ){ $cfg['attr']['method'] = 'post'; } } parent::__construct($cfg); } }

This will call the initial build for a new instance. It should be called only once from within the script. All subsequent calls to controllers should be done through $this->add($path). BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.