create() public method

New options available: - horizontal: boolean, specify if the form is horizontal - inline: boolean, specify if the form is inline - search: boolean, specify if the form is a search form Unusable options: - inputDefaults
public create ( $model = null, array $options = [] ) : The
$model The model corresponding to the form
$options array Options to customize the form
return The HTML tags corresponding to the openning of the form
Beispiel #1
0
 public function create($model = null, array $options = [])
 {
     if (is_null($model) or trim($model) == '') {
         $_id = 'MyFormCakePhp' . time();
         $options = ['id' => $_id, 'name' => $_id] + $options;
     }
     return parent::create($model, $options);
 }