Ext.Msg.alert('Invalid Data', 'Please correct form errors.') } } } ], //defaultType: 'textfield', items: [ <?php $columns = Cache::get('ext' . $model); $iteration = 0; foreach ($columns as $column) { if ($column->field == 'id') { continue; } if ($iteration) { echo ','; } $type = lext::getExtType($column->field); echo "{\n fieldLabel: '" . lext::text($column->field) . "',\n name: '{$column->field}',\n xtype: '{$type}',\n } "; $iteration++; } ?> ] }); }); </script>
<?php lext::tree('Files');
<?php lext::form('Files');
<?php lext::form('Cars');
<?php echo lext::grid('Movies');
private function generateExtModel($columns, $model, $options) { $fields = ''; $iteration = 0; foreach ($columns as $column) { if ($iteration > 0) { $fields .= ','; $fields .= "\n"; } $fields .= self::s(8, $iteration != 0) . "{ name: '{$column->field}' , type: '" . lext::getExtType($column->type) . '\' }'; $iteration++; } $handle = fopen(path('public') . 'js/EXTmodels/' . $model . '.js', "w"); $content = str_replace(array('MODEL', 'FIELDS'), array($options['Model'], $fields), file_get_contents(Bundle::path('extjs') . '/tasks/templates/ExtModel.template.js')); fwrite($handle, $content); fclose($handle); }
<?php echo lext::grid('Files');